post with curl - error 501
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > post with curl - error 501




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-07 06: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






[ Post a follow-up to this message ]



    Re: post with curl - error 501  
Davide Bianchi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-07 12:34 PM

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





[ Post a follow-up to this message ]



    Re: post with curl - error 501  
void


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-07 12:34 PM

>
> 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






[ Post a follow-up to this message ]



    Re: post with curl - error 501  
shimmyshack


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-07 06: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.






[ Post a follow-up to this message ]



    Re: post with curl - error 501  
Davide Bianchi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-07 06: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





[ Post a follow-up to this message ]



    Re: post with curl - error 501  
void


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-07 06: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






[ Post a follow-up to this message ]



    Re: post with curl - error 501  
shimmyshack


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-24-07 12:24 AM

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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:40 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register