post with curl - error 501
post with curl - error 501
am 23.09.2007 03:53:28 von kolodziejczyk.wojtek
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
Re: post with curl - error 501
am 23.09.2007 09:41:02 von unknown
Post removed (X-No-Archive: yes)
Re: post with curl - error 501
am 23.09.2007 12:20:18 von kolodziejczyk.wojtek
>
> 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
Re: post with curl - error 501
am 23.09.2007 15:02:48 von shimmyshack
On Sep 23, 11:20 am, void wrote:
> > 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
look for LIMIT directives on this server that your friend set up.
Maybe he has set
Order allow,deny
Deny From All
whereas you need
Order allow,deny
Deny From All
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.
Re: post with curl - error 501
am 23.09.2007 16:13:50 von unknown
Post removed (X-No-Archive: yes)
Re: post with curl - error 501
am 23.09.2007 16:30:51 von kolodziejczyk.wojtek
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
Re: post with curl - error 501
am 24.09.2007 01:57:13 von shimmyshack
On Sep 23, 3:13 pm, Davide Bianchi
wrote:
> On 2007-09-23, shimmyshack 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
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.