Apache Server configuration support - post with curl - error 501

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > September 2007 > post with curl - error 501





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author post with curl - error 501
kolodziejczyk.wojtek@gmail.com

2007-09-23, 1:32 am

Hi,

Friend of my set up for me an apache server (Apache/2.2.0 (Fedora),
php5, mod_rewrite, etc.. - http://serwer2.profprojekt.com.pl/info.php).

Everything works just fine, but i can't send HTTP_Request with data in
POST using CURL. Server returns error:

--------------------------------------------------------------------------------------
501 Method Not Implemented

Method Not Implemented
POST to /app/webroot/cake_gateway.php not supported.
--------------------------------------------------------------------------------------

When i'm sending requests with post using forms or ajax server manages
it faultlessly...

Anyone knows where should we looking for bug ?

best
wojtek

Davide Bianchi

2007-09-23, 7:34 am

On 2007-09-23, kolodziejczyk.wojtek@gmail.com <kolodziejczyk.wojtek@gmail.com> wrote:
> Everything works just fine, but i can't send HTTP_Request with data in
> POST using CURL. Server returns error:
>
> 501 Method Not Implemented
>
> Anyone knows where should we looking for bug ?


In your code probably.
Davide

--
Windows gives you a nice view of clouds so you can't see any potentially
useful boot time messages.
-- Bill Hay on alt.sysadmin.recovery
void

2007-09-23, 7:34 am

>
> In your code probably.
> Davide
>


Code is ok, it's working great on my local server as well as on other
servers. Problem occurring only on this one server - it's seems like
the server doesn't handle with HTTP_Request with data in POST from it
self.

I hope i'm understandable ;)

best
wojtek

shimmyshack

2007-09-23, 1:35 pm

On Sep 23, 11:20 am, void <kolodziejczyk.woj...@gmail.com> wrote:
>
> Code is ok, it's working great on my local server as well as on other
> servers. Problem occurring only on this one server - it's seems like
> the server doesn't handle with HTTP_Request with data in POST from it
> self.
>
> I hope i'm understandable ;)
>
> best
> wojtek


look for LIMIT directives on this server that your friend set up.

Maybe he has set

<LimitExcept GET>
Order allow,deny
Deny From All
</LimitExcept>

whereas you need

<LimitExcept GET POST>
Order allow,deny
Deny From All
</LimitExcept>

it could be this, have yohu tried using a proxy server to see what
headers your server returns.
What about the confniguration of cake, has POST been banned in there
for that directory. Perhaps everything is rewritten via a php script
which does not allow POST and sends back the area you are seeing.

Davide Bianchi

2007-09-23, 1:35 pm

On 2007-09-23, shimmyshack <matt.farey@gmail.com> wrote:
> look for LIMIT directives on this server that your friend set up.


The fact is, that he said in is first post that if he uses
something else and not curl it works fine, so that make me think
that the server config is ok, is something in the way the request
is made that is wrong. Unless when he said
"it works when I use forms or ajak" he meant something else...

Davide

--
The difference between math and physics is the difference between
masturbation and sex. They're both messy, but physics can get you in
much more trouble. -- Paul Tomblin & Malcom Ray
void

2007-09-23, 1:35 pm

ok, i've solved the problem

it was about mod_security. Replacing row with

SecRule REQUEST_HEADERS:Content-Type "!(?:^(?:application/x-www-form-
urlencoded$|multipart/form-data;)|text/xml)"
to
SecRule REQUEST_HEADERS:Content-Type "!(?:^(?:application/x-www-form-
urlencoded$|multipart/form-data;)|text/xml|application/x-amf)"

makes it works perfectly.

thanks for your time
best
wojtek

shimmyshack

2007-09-23, 7:24 pm

On Sep 23, 3:13 pm, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-09-23, shimmyshack <matt.fa...@gmail.com> wrote:
>
>
> The fact is, that he said in is first post that if he uses
> something else and not curl it works fine, so that make me think
> that the server config is ok, is something in the way the request
> is made that is wrong. Unless when he said
> "it works when I use forms or ajak" he meant something else...
>
> Davide
>
> --
> The difference between math and physics is the difference between
> masturbation and sex. They're both messy, but physics can get you in
> much more trouble. -- Paul Tomblin & Malcom Ray


yeah sorry Davide, I didn't spot that. As you said it turned out to be
his code the whole time which he solved by ammending his mod security
rule for some reason.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com