You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/10/30 13:56:45 UTC
[GitHub] [trafficserver] cheluskin opened a new issue #8481: Wrong response on range request
cheluskin opened a new issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481
ATS return only first sliced segment. Not requested range.
<details><summary>response from ATS</summary>
<p>
```log
curl -sSL -D - -r 0-5242880 https://cdn.armdb.org/file/armdb-cdn/videos/bb.mp4 -o /dev/null
HTTP/2 200
date: Sat, 30 Oct 2021 13:36:15 GMT
content-type: video/mp4
content-length: 1048576
x-bz-file-name: videos/bb.mp4
x-bz-file-id: 4_zf5db031f6cc3a9fd75c7001b_f1144c3d2e3c3b041_d20211030_m130044_c003_v0312009_t0019
x-bz-content-sha1: e3e94913af743085d84350d161bbe2fc6ae92315
x-bz-upload-timestamp: 1635598844000
accept-ranges: bytes
cache-control: max-age=31104000
x-bz-info-src_last_modified_millis: 1635598687000
content-range: bytes 0-1048575/30704510
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=r4lvB%2BWXi%2B64S8fL%2FR0LfqVdPUookK6WvMbRNbY1iPveJxorWsBdGrofKMDRAFS%2B9N%2BZAHlQIy4IaoVJgRb4Suoz9JlCNwtxBJJhmy2oUyJXVUE%2FOvIFBQ1CqequF%2F6F5t0%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: ATS/10.0.0
cf-ray: 6a65080ec9d7412b-PRG
age: 0
```
</p>
</details>
<details><summary>response from Origin server</summary>
<p>
```log
curl -sSL -D - -r 0-5242880 https://origin.armdb.org/file/armdb-cdn/videos/bb.mp4 -o /dev/null
HTTP/2 206
date: Sat, 30 Oct 2021 13:35:31 GMT
content-type: video/mp4
content-length: 5242881
x-bz-file-name: videos/bb.mp4
x-bz-file-id: 4_zf5db031f6cc3a9fd75c7001b_f1144c3d2e3c3b041_d20211030_m130044_c003_v0312009_t0019
x-bz-content-sha1: e3e94913af743085d84350d161bbe2fc6ae92315
x-bz-upload-timestamp: 1635598844000
accept-ranges: bytes
cache-control: max-age=31104000
x-bz-info-src_last_modified_millis: 1635598687000
content-range: bytes 0-5242880/30704510
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=5rNGKLUuPeuy78tSza793tq0RzmpPbxNYOVbBT%2BvH0R9eHYEe%2FjUZmI9Ol8ZUo%2FelwF51buxvNbDCKQtJEoZKfjbIOd0rr7MtaSlfYPPuqHgSa74Y9eHkDnZ110JJujFQm8%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 6a6506fb48632d30-KBP
```
</p>
</details>
record.config
```
CONFIG proxy.config.http.cache.http INT 1
CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.remap_required INT 1
CONFIG proxy.config.http.server_ports STRING 80 443:ssl
CONFIG proxy.config.admin.user_id STRING ats
CONFIG proxy.config.diags.debug.enabled INT 1
CONFIG proxy.config.diags.output.diag STRING L
CONFIG proxy.config.diags.output.debug STRING L
CONFIG proxy.config.diags.debug.tags STRING cache|http|dns|slice|cache_range_requests
```
remap.config
```
map https://cdn.armdb.org https://origin.armdb.org @plugin=slice.so @plugin=cache_range_requests.so
```
[diags.log](https://github.com/apache/trafficserver/files/7446682/diags.log)
[squid.log](https://github.com/apache/trafficserver/files/7446683/squid.log)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak removed a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak removed a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
This certainly is a bug as the whole asset should be passed through if the parent responds with a 200 to a range request. However the slice plugin only works with parents that can return a 206.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak edited a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak edited a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] cheluskin commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
cheluskin commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957304908
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956936943
Looking at the code for some reason the cache_range_requests plugin expects both "206" and "Partial Content". I don't see "Partial Content" as a reason from the origin. The question is, *should* the cache_range_requests plugin expect this.
I believe that as a workaround you can add a header_rewrite plugin with a rule to set reason to "Partial Content" if a 206 header status is encountered.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] cheluskin commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
cheluskin commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957320328
Also, the behavior is not at all origins. This example is backblaze. With nginx as origin, the bug is not reproduced. You are probably right about the header. I spoke with b2 support, but they don't see any problems on their side
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957399619
Reading the spec it's probably not reasonable for the cache_range_requests plugin to *require* the "Partial Content" reason string. All that matters is the "206". I can PR that at least.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak removed a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak removed a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
This certainly is a bug as the whole asset should be passed through if the parent responds with a 200 to a range request. However the slice plugin only works with parents that can return a 206.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak removed a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak removed a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
This certainly is a bug as the whole asset should be passed through if the parent responds with a 200 to a range request. However the slice plugin only works with parents that can return a 206.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] cheluskin commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
cheluskin commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957304908
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak closed issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak closed issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] cheluskin commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
cheluskin commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957304908
Thanks. Maybe I'm doing something wrong. But nothing has changed
```
curl -sSL -D - -r 0-5242880 https://cdn.armdb.org/file/armdb-cdn/videos/bb.mp4 -o /dev/null
HTTP/2 200
date: Tue, 02 Nov 2021 10:14:48 GMT
content-type: video/mp4
content-length: 1048576
x-bz-file-name: videos/bb.mp4
x-bz-file-id: 4_zf5db031f6cc3a9fd75c7001b_f1144c3d2e3c3b041_d20211030_m130044_c003_v0312009_t0019
x-bz-content-sha1: e3e94913af743085d84350d161bbe2fc6ae92315
x-bz-upload-timestamp: 1635598844000
accept-ranges: bytes
cache-control: max-age=31104000
x-bz-info-src_last_modified_millis: 1635598687000
content-range: bytes 0-1048575/30704510
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=P7piQcF64JTQt1j8Q5se2pfZNFd5ABvR5YYFMr07c4bbonpygCIjCSN6fPgnpKjh9xW%2F8STGTS%2FY3w%2FMOzk9lr%2FGDuZqp4CETeSqUBSO9P%2FyLbT0nfekfMseCYKt5F5Uomw%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: ATS/10.0.0
cf-ray: 6a7c9917ec6a2774-PRG
age: 0
```
```
map https://cdn.armdb.org https://origin.armdb.org @plugin=header_rewrite.so @pparam=rules1.conf @plugin=slice.so @plugin=cache_range_requests.so
```
```
cond %{READ_RESPONSE_HDR_HOOK}
cond %{STATUS} = 206
set-status 206
set-status-reason Partial Content
```
[diags.log](https://github.com/apache/trafficserver/files/7459741/diags.log)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak edited a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak edited a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak edited a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak edited a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
This certainly is a bug as the whole asset should be passed through if the parent responds with a 200 to a range request. However the slice plugin only works with parents that can return a 206.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] cheluskin commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
cheluskin commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957681235
Thanks, the patch works
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak commented on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak commented on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-956913176
This certainly is a bug as the whole asset should be passed through if the server responds with a 200 to a range request. However the slice plugin only works with servers that can return a 206.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] traeak edited a comment on issue #8481: Wrong response on range request
Posted by GitBox <gi...@apache.org>.
traeak edited a comment on issue #8481:
URL: https://github.com/apache/trafficserver/issues/8481#issuecomment-957399619
Reading the spec it's probably not reasonable for the cache_range_requests plugin to *require* the "Partial Content" reason string. Looking more closely the CRR plugin should set that "Partial Content" reason string itself as it is using the "hack" of changing a 206 to a 200 to allow the range to be cached, then using a 200 response with "Partial Content" reason string to detect the "hack"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org