Comments (4)
I did some printf debugging today. I see the spot in request.cpp where it calls the error handler. I put a printt() above that like this:
if(m_environment.postBuffer().size()+(bodyEnd-body)
> environment().contentLength)
{
printf("IN: postBuffer: %hu, environment().contentLength: %hu\n",
m_environment.postBuffer().size()+(bodyEnd-body),
environment().contentLength
);
bigPostErrorHandler();
and saw this in my output
IN: postBuffer: 91, environment().contentLength: 0
I'm not sure what sets environment().contentLength but I'm looking into that.
I'm pretty sure this has something to do with my nginx fastcgi setup but have not worked it out yet. Any help is appreciated.
from fastcgipp.
Ah interesting. A few things might be happening. Either nginx is stripping the content-length header or the client isn't sending it at all. This code here is basically just rejecting badly formed POST queries. It saying "The client is trying to send us more data than it declared in it's content-length header".
from fastcgipp.
Ahhh. I see. Maybe I need to pass the content length in my nginx setup.
from fastcgipp.
That was it. I added CONTENT_TYPE and CONTENT_LENGTH to my fastcgi setup
location /rtjambox {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $uri;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass unix:/tmp/rtjambox.sock;
}
Thank you. for checking.
from fastcgipp.
Related Issues (20)
- [failed build example]try use c++20 modules for compile my example
- Support the Meson build system. HOT 1
- Prevent GCC warnings
- Sould not register signal handlers HOT 3
- how to make a json response? HOT 1
- Windows systems not supported??? HOT 1
- 3.1 Release HOT 1
- undefined reference to pthread, for examples HOT 3
- error: ‘Fastcgipp::Http::RequestMethod’ is not a class or namespace
- GLIBC_2.38 not found
- tests/curl.cpp cannot POST data to another website HOT 7
- Overview of logging mechanism
- fastcgipp and proxy HOT 1
- CMake PostgreSQL missing required version number HOT 4
- io_uring support? HOT 2
- postgres pipline query HOT 1
- Permission not being set on unix socket according to permission parameter in listen() call. HOT 2
- Error during compilation on Ubuntu 16.04, g++ 5.4 HOT 2
- Missing virtual destructor in Curl_base HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastcgipp.