ASF Bugzilla – Attachment 37097 Details for
Bug 61820
304 headers stripped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Strip only unwanted headers
headers_stripped-61820.diff (text/plain), 2.11 KB, created by
Giovanni Bechis
on 2020-03-12 18:40:47 UTC
(
hide
)
Description:
Strip only unwanted headers
Filename:
MIME Type:
Creator:
Giovanni Bechis
Created:
2020-03-12 18:40:47 UTC
Size:
2.11 KB
patch
obsolete
>Index: modules/http/http_filters.c >=================================================================== >--- modules/http/http_filters.c (revision 1874808) >+++ modules/http/http_filters.c (working copy) >@@ -1430,25 +1430,28 @@ > h.bb = b2; > > if (r->status == HTTP_NOT_MODIFIED) { >- apr_table_do((int (*)(void *, const char *, const char *)) form_header_field, >- (void *) &h, r->headers_out, >- "Connection", >- "Keep-Alive", >- "ETag", >- "Content-Location", >- "Expires", >- "Cache-Control", >- "Vary", >- "Warning", >- "WWW-Authenticate", >- "Proxy-Authenticate", >- "Set-Cookie", >- "Set-Cookie2", >- NULL); >+ /* >+ * List of headers Gecko doesn't update on a 304 (or 206 partial content) >+ * https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsHttpResponseHead.cpp#862 >+ */ >+ apr_table_unset(r->headers_out, "Connection"); >+ apr_table_unset(r->headers_out, "Proxy_Connection"); >+ apr_table_unset(r->headers_out, "Keep_Alive"); >+ apr_table_unset(r->headers_out, "Proxy_Authenticate"); >+ apr_table_unset(r->headers_out, "Proxy_Authorization"); >+ apr_table_unset(r->headers_out, "TE"); >+ apr_table_unset(r->headers_out, "Trailer"); >+ apr_table_unset(r->headers_out, "Transfer_Encoding"); >+ apr_table_unset(r->headers_out, "Upgrade"); >+ apr_table_unset(r->headers_out, "Content_Location"); >+ apr_table_unset(r->headers_out, "Content_MD5"); >+ apr_table_unset(r->headers_out, "ETag"); >+ apr_table_unset(r->headers_out, "Content_Encoding"); >+ apr_table_unset(r->headers_out, "Content_Range"); >+ apr_table_unset(r->headers_out, "Content_Type"); >+ apr_table_unset(r->headers_out, "Content_Length"); > } >- else { >- send_all_header_fields(&h, r); >- } >+ send_all_header_fields(&h, r); > > terminate_header(b2); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61820
:
37097
|
37269
|
37345