6
I need to make a very large GET request with NGINX and PHP. Is there any configuration in NGINX or PHP that solves this?
6
I need to make a very large GET request with NGINX and PHP. Is there any configuration in NGINX or PHP that solves this?
4
Amend the Directive large_client_header_buffers
.
Directive assigns the Maximum number and size of buffers for large headers to read from client request.
The request line can not be Bigger than the size of one buffer, if the client send a Bigger header Nginx Returns error "Request URI Too large" (414).
The Longest header line of request must also be not more than the size of one buffer, otherwise the client get the error "Bad request" (400).
Buffers are separated only as needed.
By default the size of one buffer is 8192 bytes. In the old Nginx, this is Equal to the size of page, Depending on Platform this either 4K or 8K, if at the end of Working request Connection converts to state Keep-Alive, then These buffers are Freed.
Translating:
This directive assigns a maximum number and size of buffers to long headers read from client request.
The request line cannot be larger than the buffer size, and if the client sends a header Nginx will return a "Request URI Too large" error (414).
The largest header row also cannot be larger than the size of a buffer, otherwise the client will receive a "Bad request" error (400).
Buffers are separated only if necessary.
By default the size of a buffer is 8192 bytes. In old Nginx, this is equivalent to the page size - depending on the platform, it is 4K or 8K; if at the end of the current request the connection acquires the state of Keep-Alive, then these buffers are released.
Reference: http://wiki.nginx.org/NginxHttpCoreModule#large_client_header_buffers
1
The maximum GET size is usually limited both on the server and on the client, and this limit is usually 8KB. If the client is going through a proxy, there is probably a limit there as well. That is, if you really need of larger GET requests than this, you will have to check the settings of all of them.
Browser other questions tagged php nginx get
You are not signed in. Login or sign up in order to post.
If you need more than 255 bytes the correct would be to use POST (although browsers support more than that). Look the note in the specification. For some reason the POST does not work?
– Gustavo Rodrigues