Request entity too large when passing POST data in curlHow to send a header using a HTTP request through a curl call?How can I see the request headers made by curl when sending a request to the server?PHP + curl, HTTP POST sample code?How to display request headers with command line curlHow do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?Getting only response header from HTTP POST using curlUsing curl to upload POST data with filesHow to do a PUT request with curl?How do I measure request and response times at once using cURL?HTML and Apache2 dont play mp4 video
Did Ham the Chimp follow commands, or did he just randomly push levers?
How do I give a darkroom course without negs from the attendees?
How can I test a shell script in a "safe environment" to avoid harm to my computer?
Are modes in jazz primarily a melody thing?
What chord could the notes 'F A♭ E♭' form?
Select list elements based on other list
Is it safe to keep the GPU on 100% utilization for a very long time?
Searching for a sentence that I only know part of it using Google's operators
Antivirus for Ubuntu 18.04
Splitting polygons and dividing attribute value proportionally using ArcGIS Pro?
What detail can Hubble see on Mars?
Convert Numbers To Emoji Math
Picking a theme as a discovery writer
Where do 5 or more U.S. counties meet in a single point?
Does this website provide consistent translation into Wookiee?
I want to write a blog post building upon someone else's paper, how can I properly cite/credit them?
Make me a minimum magic sum
Convert a huge txt-file into a dataset
How can I finally understand the confusing modal verb "мочь"?
Magical Modulo Squares
Which "exotic salt" can lower water's freezing point by 70 °C?
How to increase speed on my hybrid bike with flat handlebars and 700X35C tyres?
If an attacker targets a creature with the Sanctuary spell cast on them, but fails the Wisdom save, can they choose not to attack anyone else?
call() a function within its own context
Request entity too large when passing POST data in curl
How to send a header using a HTTP request through a curl call?How can I see the request headers made by curl when sending a request to the server?PHP + curl, HTTP POST sample code?How to display request headers with command line curlHow do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?Getting only response header from HTTP POST using curlUsing curl to upload POST data with filesHow to do a PUT request with curl?How do I measure request and response times at once using cURL?HTML and Apache2 dont play mp4 video
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a fastcgi++ service. It takes 4 parameters through POST because one of them is a password. My sample input is 61 characters. This is how I am calling my service:
curl --data 'name=test&address=abc&phoneNumber=0987654321&password=test123' http://localhost/cgi-bin/add-user.fcg
I get this error: 413 Request Entity too large. Based on my research I found that it means apache was expecting a smaller body than it got. So, I added LimitRequestBody 0
to httpd.conf (I am not in production environment). But apache still complains that the request entity is too large.
I added -v to curl and this is the output:
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> POST /cgi-bin/add-user.fcg HTTP/1.1
> Host: localhost
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 60
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 60 out of 60 bytes
< HTTP/1.1 413 Request Entity Too Large
< Date: Sun, 24 Mar 2019 03:48:09 GMT
< Server: Apache/2.4.38 (Fedora) mod_fcgid/2.3.9
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
* Closing connection 0
<!DOCTYPE html><html lang='en'><head><title>413 Request Entity Too Large</title></head><body><h1>413 Request Entity Too Large</h1></body></html>
This is my httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
Require all granted
SetHandler fcgid-script
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
#I added the line below
LimitRequestBody 0
This it the fcgid.conf:
AddHandler fcgid-script fcg fcgi fpl
Sane place to put sockets and shared memory file
FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
apache curl http-status-code-413 fastcgi++ fedora-29
|
show 12 more comments
I have a fastcgi++ service. It takes 4 parameters through POST because one of them is a password. My sample input is 61 characters. This is how I am calling my service:
curl --data 'name=test&address=abc&phoneNumber=0987654321&password=test123' http://localhost/cgi-bin/add-user.fcg
I get this error: 413 Request Entity too large. Based on my research I found that it means apache was expecting a smaller body than it got. So, I added LimitRequestBody 0
to httpd.conf (I am not in production environment). But apache still complains that the request entity is too large.
I added -v to curl and this is the output:
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> POST /cgi-bin/add-user.fcg HTTP/1.1
> Host: localhost
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 60
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 60 out of 60 bytes
< HTTP/1.1 413 Request Entity Too Large
< Date: Sun, 24 Mar 2019 03:48:09 GMT
< Server: Apache/2.4.38 (Fedora) mod_fcgid/2.3.9
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
* Closing connection 0
<!DOCTYPE html><html lang='en'><head><title>413 Request Entity Too Large</title></head><body><h1>413 Request Entity Too Large</h1></body></html>
This is my httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
Require all granted
SetHandler fcgid-script
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
#I added the line below
LimitRequestBody 0
This it the fcgid.conf:
AddHandler fcgid-script fcg fcgi fpl
Sane place to put sockets and shared memory file
FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
apache curl http-status-code-413 fastcgi++ fedora-29
add-v
to curl, what do you get?
– hanshenrik
Mar 23 at 11:59
Did you restart apache/php handler after changing conf?
– Harikrishnan
Mar 23 at 12:05
Yes @Harikrishnan. I did it again after reading your comment. Nothing happened. The results are the same
– Hemil
Mar 24 at 3:51
Added the -v output in the question @hanshenrik
– Hemil
Mar 24 at 3:52
60 bytes is too low to trigger 413 error. I think your apache is misconfigured.
– Harikrishnan
Mar 24 at 4:55
|
show 12 more comments
I have a fastcgi++ service. It takes 4 parameters through POST because one of them is a password. My sample input is 61 characters. This is how I am calling my service:
curl --data 'name=test&address=abc&phoneNumber=0987654321&password=test123' http://localhost/cgi-bin/add-user.fcg
I get this error: 413 Request Entity too large. Based on my research I found that it means apache was expecting a smaller body than it got. So, I added LimitRequestBody 0
to httpd.conf (I am not in production environment). But apache still complains that the request entity is too large.
I added -v to curl and this is the output:
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> POST /cgi-bin/add-user.fcg HTTP/1.1
> Host: localhost
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 60
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 60 out of 60 bytes
< HTTP/1.1 413 Request Entity Too Large
< Date: Sun, 24 Mar 2019 03:48:09 GMT
< Server: Apache/2.4.38 (Fedora) mod_fcgid/2.3.9
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
* Closing connection 0
<!DOCTYPE html><html lang='en'><head><title>413 Request Entity Too Large</title></head><body><h1>413 Request Entity Too Large</h1></body></html>
This is my httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
Require all granted
SetHandler fcgid-script
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
#I added the line below
LimitRequestBody 0
This it the fcgid.conf:
AddHandler fcgid-script fcg fcgi fpl
Sane place to put sockets and shared memory file
FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
apache curl http-status-code-413 fastcgi++ fedora-29
I have a fastcgi++ service. It takes 4 parameters through POST because one of them is a password. My sample input is 61 characters. This is how I am calling my service:
curl --data 'name=test&address=abc&phoneNumber=0987654321&password=test123' http://localhost/cgi-bin/add-user.fcg
I get this error: 413 Request Entity too large. Based on my research I found that it means apache was expecting a smaller body than it got. So, I added LimitRequestBody 0
to httpd.conf (I am not in production environment). But apache still complains that the request entity is too large.
I added -v to curl and this is the output:
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> POST /cgi-bin/add-user.fcg HTTP/1.1
> Host: localhost
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 60
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 60 out of 60 bytes
< HTTP/1.1 413 Request Entity Too Large
< Date: Sun, 24 Mar 2019 03:48:09 GMT
< Server: Apache/2.4.38 (Fedora) mod_fcgid/2.3.9
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
* Closing connection 0
<!DOCTYPE html><html lang='en'><head><title>413 Request Entity Too Large</title></head><body><h1>413 Request Entity Too Large</h1></body></html>
This is my httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
Require all granted
SetHandler fcgid-script
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
#I added the line below
LimitRequestBody 0
This it the fcgid.conf:
AddHandler fcgid-script fcg fcgi fpl
Sane place to put sockets and shared memory file
FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
apache curl http-status-code-413 fastcgi++ fedora-29
apache curl http-status-code-413 fastcgi++ fedora-29
edited Mar 31 at 12:49
Hemil
asked Mar 23 at 5:49
HemilHemil
328113
328113
add-v
to curl, what do you get?
– hanshenrik
Mar 23 at 11:59
Did you restart apache/php handler after changing conf?
– Harikrishnan
Mar 23 at 12:05
Yes @Harikrishnan. I did it again after reading your comment. Nothing happened. The results are the same
– Hemil
Mar 24 at 3:51
Added the -v output in the question @hanshenrik
– Hemil
Mar 24 at 3:52
60 bytes is too low to trigger 413 error. I think your apache is misconfigured.
– Harikrishnan
Mar 24 at 4:55
|
show 12 more comments
add-v
to curl, what do you get?
– hanshenrik
Mar 23 at 11:59
Did you restart apache/php handler after changing conf?
– Harikrishnan
Mar 23 at 12:05
Yes @Harikrishnan. I did it again after reading your comment. Nothing happened. The results are the same
– Hemil
Mar 24 at 3:51
Added the -v output in the question @hanshenrik
– Hemil
Mar 24 at 3:52
60 bytes is too low to trigger 413 error. I think your apache is misconfigured.
– Harikrishnan
Mar 24 at 4:55
add
-v
to curl, what do you get?– hanshenrik
Mar 23 at 11:59
add
-v
to curl, what do you get?– hanshenrik
Mar 23 at 11:59
Did you restart apache/php handler after changing conf?
– Harikrishnan
Mar 23 at 12:05
Did you restart apache/php handler after changing conf?
– Harikrishnan
Mar 23 at 12:05
Yes @Harikrishnan. I did it again after reading your comment. Nothing happened. The results are the same
– Hemil
Mar 24 at 3:51
Yes @Harikrishnan. I did it again after reading your comment. Nothing happened. The results are the same
– Hemil
Mar 24 at 3:51
Added the -v output in the question @hanshenrik
– Hemil
Mar 24 at 3:52
Added the -v output in the question @hanshenrik
– Hemil
Mar 24 at 3:52
60 bytes is too low to trigger 413 error. I think your apache is misconfigured.
– Harikrishnan
Mar 24 at 4:55
60 bytes is too low to trigger 413 error. I think your apache is misconfigured.
– Harikrishnan
Mar 24 at 4:55
|
show 12 more comments
2 Answers
2
active
oldest
votes
I should have mentioned that I was using the fastcgi++ library. As @covener mentioned, the 413 page was not apache's. It turns out that it was fastcgi++. I should have read the docs first. It clearly mentions here that POST is not enabled by default. Adding a constructor to my class and calling the Request constructor with the max size of POST requests I wanted, solved the problem.
P.S. thanks a lot @hansherik for all the hours of debugging you have done for me.
add a comment |
(not an answer, but too big for a comment)
what do you get if you run this php script?
<?php
declare(strict_types=1);
header("Content-Type: text/plain;charset=utf-8");
$ch=curl_init('http://localhost/cgi-bin/add-user.fcg');
curl_setopt_array($ch,array(CURLOPT_USERAGENT=>'curl/7.61.1',CURLOPT_RETURNTRANSFER=>1));
$post_str="";
for($i=0;$i<61;++$i)
curl_setopt_array($ch,array(
CURLOPT_POST=>1,
CURLOPT_POSTFIELDS=>$post_str,
));
curl_exec($ch);
$code=curl_getinfo($ch,CURLINFO_RESPONSE_CODE);
echo "bytes: $i code: $coden";
$post_str.="a";
curl_close($ch);
echo "finished loop";
End of script output before headers
– Hemil
Mar 24 at 8:45
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
I sent a request on discord asHemilr
– Hemil
Mar 24 at 8:53
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311012%2frequest-entity-too-large-when-passing-post-data-in-curl%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I should have mentioned that I was using the fastcgi++ library. As @covener mentioned, the 413 page was not apache's. It turns out that it was fastcgi++. I should have read the docs first. It clearly mentions here that POST is not enabled by default. Adding a constructor to my class and calling the Request constructor with the max size of POST requests I wanted, solved the problem.
P.S. thanks a lot @hansherik for all the hours of debugging you have done for me.
add a comment |
I should have mentioned that I was using the fastcgi++ library. As @covener mentioned, the 413 page was not apache's. It turns out that it was fastcgi++. I should have read the docs first. It clearly mentions here that POST is not enabled by default. Adding a constructor to my class and calling the Request constructor with the max size of POST requests I wanted, solved the problem.
P.S. thanks a lot @hansherik for all the hours of debugging you have done for me.
add a comment |
I should have mentioned that I was using the fastcgi++ library. As @covener mentioned, the 413 page was not apache's. It turns out that it was fastcgi++. I should have read the docs first. It clearly mentions here that POST is not enabled by default. Adding a constructor to my class and calling the Request constructor with the max size of POST requests I wanted, solved the problem.
P.S. thanks a lot @hansherik for all the hours of debugging you have done for me.
I should have mentioned that I was using the fastcgi++ library. As @covener mentioned, the 413 page was not apache's. It turns out that it was fastcgi++. I should have read the docs first. It clearly mentions here that POST is not enabled by default. Adding a constructor to my class and calling the Request constructor with the max size of POST requests I wanted, solved the problem.
P.S. thanks a lot @hansherik for all the hours of debugging you have done for me.
answered Mar 31 at 12:56
HemilHemil
328113
328113
add a comment |
add a comment |
(not an answer, but too big for a comment)
what do you get if you run this php script?
<?php
declare(strict_types=1);
header("Content-Type: text/plain;charset=utf-8");
$ch=curl_init('http://localhost/cgi-bin/add-user.fcg');
curl_setopt_array($ch,array(CURLOPT_USERAGENT=>'curl/7.61.1',CURLOPT_RETURNTRANSFER=>1));
$post_str="";
for($i=0;$i<61;++$i)
curl_setopt_array($ch,array(
CURLOPT_POST=>1,
CURLOPT_POSTFIELDS=>$post_str,
));
curl_exec($ch);
$code=curl_getinfo($ch,CURLINFO_RESPONSE_CODE);
echo "bytes: $i code: $coden";
$post_str.="a";
curl_close($ch);
echo "finished loop";
End of script output before headers
– Hemil
Mar 24 at 8:45
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
I sent a request on discord asHemilr
– Hemil
Mar 24 at 8:53
add a comment |
(not an answer, but too big for a comment)
what do you get if you run this php script?
<?php
declare(strict_types=1);
header("Content-Type: text/plain;charset=utf-8");
$ch=curl_init('http://localhost/cgi-bin/add-user.fcg');
curl_setopt_array($ch,array(CURLOPT_USERAGENT=>'curl/7.61.1',CURLOPT_RETURNTRANSFER=>1));
$post_str="";
for($i=0;$i<61;++$i)
curl_setopt_array($ch,array(
CURLOPT_POST=>1,
CURLOPT_POSTFIELDS=>$post_str,
));
curl_exec($ch);
$code=curl_getinfo($ch,CURLINFO_RESPONSE_CODE);
echo "bytes: $i code: $coden";
$post_str.="a";
curl_close($ch);
echo "finished loop";
End of script output before headers
– Hemil
Mar 24 at 8:45
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
I sent a request on discord asHemilr
– Hemil
Mar 24 at 8:53
add a comment |
(not an answer, but too big for a comment)
what do you get if you run this php script?
<?php
declare(strict_types=1);
header("Content-Type: text/plain;charset=utf-8");
$ch=curl_init('http://localhost/cgi-bin/add-user.fcg');
curl_setopt_array($ch,array(CURLOPT_USERAGENT=>'curl/7.61.1',CURLOPT_RETURNTRANSFER=>1));
$post_str="";
for($i=0;$i<61;++$i)
curl_setopt_array($ch,array(
CURLOPT_POST=>1,
CURLOPT_POSTFIELDS=>$post_str,
));
curl_exec($ch);
$code=curl_getinfo($ch,CURLINFO_RESPONSE_CODE);
echo "bytes: $i code: $coden";
$post_str.="a";
curl_close($ch);
echo "finished loop";
(not an answer, but too big for a comment)
what do you get if you run this php script?
<?php
declare(strict_types=1);
header("Content-Type: text/plain;charset=utf-8");
$ch=curl_init('http://localhost/cgi-bin/add-user.fcg');
curl_setopt_array($ch,array(CURLOPT_USERAGENT=>'curl/7.61.1',CURLOPT_RETURNTRANSFER=>1));
$post_str="";
for($i=0;$i<61;++$i)
curl_setopt_array($ch,array(
CURLOPT_POST=>1,
CURLOPT_POSTFIELDS=>$post_str,
));
curl_exec($ch);
$code=curl_getinfo($ch,CURLINFO_RESPONSE_CODE);
echo "bytes: $i code: $coden";
$post_str.="a";
curl_close($ch);
echo "finished loop";
answered Mar 24 at 8:41
hanshenrikhanshenrik
10.9k21841
10.9k21841
End of script output before headers
– Hemil
Mar 24 at 8:45
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
I sent a request on discord asHemilr
– Hemil
Mar 24 at 8:53
add a comment |
End of script output before headers
– Hemil
Mar 24 at 8:45
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
I sent a request on discord asHemilr
– Hemil
Mar 24 at 8:53
End of script output before headers
– Hemil
Mar 24 at 8:45
End of script output before headers
– Hemil
Mar 24 at 8:45
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
@Hemil i doubt it, but okay.. i'm bored, can you contact me on Facebook or Discord now? wanna see it for myself - stackoverflow.com/users/1067003/hanshenrik?tab=profile
– hanshenrik
Mar 24 at 8:48
I sent a request on discord as
Hemilr
– Hemil
Mar 24 at 8:53
I sent a request on discord as
Hemilr
– Hemil
Mar 24 at 8:53
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311012%2frequest-entity-too-large-when-passing-post-data-in-curl%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
add
-v
to curl, what do you get?– hanshenrik
Mar 23 at 11:59
Did you restart apache/php handler after changing conf?
– Harikrishnan
Mar 23 at 12:05
Yes @Harikrishnan. I did it again after reading your comment. Nothing happened. The results are the same
– Hemil
Mar 24 at 3:51
Added the -v output in the question @hanshenrik
– Hemil
Mar 24 at 3:52
60 bytes is too low to trigger 413 error. I think your apache is misconfigured.
– Harikrishnan
Mar 24 at 4:55