Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Rewrite html responses from POST requests #421

Closed
oschaaf opened this issue Jul 6, 2013 · 3 comments · Fixed by #428
Closed

Rewrite html responses from POST requests #421

oschaaf opened this issue Jul 6, 2013 · 3 comments · Fixed by #428
Assignees
Labels

Comments

@oschaaf
Copy link
Member

oschaaf commented Jul 6, 2013

Currently, when we receive a POST request we never rewrite the response.
I think we could safely rewrite POST requests that result in a 200/OK response.
Comparing mod_pagespeed, I can't find code that restricts rewriting in this case.

Reported at https://groups.google.com/forum/#!topic/ngx-pagespeed-discuss/LiWQI7wRBJo

@jeffkaufman
Copy link
Contributor

Looking at the apache implementation and proxy_interface, I think what this was supposed to do is only handle HEAD and GET requests for resources. For HTML we shouldn't care about request method.

@oschaaf
Copy link
Member Author

oschaaf commented Jul 8, 2013

@jeffkaufman Should I drop the check for the request method altogether for HTML? Or is this fine as-is?

I'm a bit anxious to drop the check on requests method altogether right now, as we should probably test less commonly used methods like OPTIONS/PUT/DELETE etc to make sure that nginx doesn't throw something we don't expect at us?

@jeffkaufman
Copy link
Contributor

What if we just do this instead? #428

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.