[Privoxy-commits] [privoxy] 12/12: sed(): Don't call enforce_header_order() if a filter removed the request line
    User Git 
    git at git.privoxy.org
       
    Tue Jan  5 13:56:48 UTC 2021
    
    
  
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit ff3493f08f35e907620bc9d56ba202d7e1300a68
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Jan 5 14:32:50 2021 +0100
    sed(): Don't call enforce_header_order() if a filter removed the request line
    
    ... as enforce_header_order() asserts that the request line is present.
    
    Without the request line the request will be rejected as invalid
    later on anyway, so sorting the headers first is pointless.
---
 parsers.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/parsers.c b/parsers.c
index d63647d8..ba151d15 100644
--- a/parsers.c
+++ b/parsers.c
@@ -1291,7 +1291,9 @@ jb_err sed(struct client_state *csp, int filter_server_headers)
       f++;
    }
 
-   if (!filter_server_headers && !list_is_empty(csp->config->ordered_client_headers))
+   if (!filter_server_headers &&
+       !list_is_empty(csp->config->ordered_client_headers) &&
+       csp->headers->first->str != NULL)
    {
       enforce_header_order(csp->headers, csp->config->ordered_client_headers);
    }
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the Privoxy-commits
mailing list