403 forbidden while submitting a POST request with image data via iPhone application
Posted
by
binnyb
on Server Fault
See other posts from Server Fault
or by binnyb
Published on 2011-01-12T19:02:01Z
Indexed on
2011/01/12
19:55 UTC
Read the original article
Hit count: 422
I am creating an iOS application which allows users to send image/text data to my webserver via a POST request. I am successfully sending POSTS to the server when image data is not included in the request. Any time i POST with image data the server spits back a 403 forbidden. I have tried adding the following to the .htaccess file in the directory of the script with no luck:
Options +Indexes FollowSymLinks +ExecCGI
Order allow,deny
Allow from all
web browsers and Android devices can successfully POST with image data to the script, the only device which cannot is the iPhone.
POSTING with data to other hosting providers works as expected - it is just this host(ipowerweb.com).
i noticed that when i try to POST to ANY script on the server with data returns a 403 forbidden. another note: i can successfully post to another server that is hosted by ipowerweb, but mine cant seem to handle it.
My host has tried to resolve the issue but cannot, and they have marked it on their end as "resolved", so no more help from them. I wish to keep this host as moving would be a pain - i will change hosts as a last resort, so please help me!
Why am i getting this 403 forbidden error only when i submit data via my iPhone application?
How can i resolve the issue so i can successfully POST data?
any advice on what i can do would be greatly appreciated.
edit: as request, here are the response headers:
{
Connection = close;
"Content-Length" = 217;
"Content-Type" = "text/html; charset=iso-8859-1";
Date = "Wed, 12 Jan 2011 19:11:19 GMT";
Server = "Apache/2";
}
edit: as request here are the request headers(oops):
{
"Accept-Encoding" = gzip;
"Content-Length" = 5781;
"Content-Type" = "multipart/form-data; charset=utf-8; boundary=0xKhTmLbOuNdArY";
"User-Agent" = "YeahIAteThat 1.0 (iPhone; iPhone OS 4.2.1; en_US)";
}
© Server Fault or respective owner