Apache Mod Proxy with HTTP Post
am 12.09.2009 04:35:03 von MarkAtHarvest
I have configured my proxy as below
ProxyRequests off
Order Allow,Deny
Allow from all
ProxyPass /tproxy/ http://twitter.com/
ProxyPassReverse /tproxy/ http://twitter.com/
RequestHeader unset Accept-Encoding
I am trying access Twitter webservice REST APIS from my client..
Everything works fine, if I make a HTTP GET request and I get a XML
response Back..
But my webService REST request for HTTP POST fails.. and Logs also do not
say anyting..
Please guide.
--
View this message in context: http://www.nabble.com/Apache-Mod-Proxy-with-HTTP-Post-tp2541 0994p25410994.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache Mod Proxy with HTTP Post
am 12.09.2009 12:31:09 von aw
MarkAtHarvest wrote:
> I have configured my proxy as below
> ProxyRequests off
>
> Order Allow,Deny
> Allow from all
>
> ProxyPass /tproxy/ http://twitter.com/
> ProxyPassReverse /tproxy/ http://twitter.com/
> RequestHeader unset Accept-Encoding
>
> I am trying access Twitter webservice REST APIS from my client..
> Everything works fine, if I make a HTTP GET request and I get a XML
> response Back..
> But my webService REST request for HTTP POST fails.. and Logs also do not
> say anyting..
>
Hi.
From the above, it is not very clear what is not working, or even if it
is any problem of Apache, rather than a problem of your client or of
Twitter (like, does it support POST ?).
Can you please be a little bit more explicit about what you are sending
where, what your client is, if you have looked at the packets being sent
back and forth, if you have tried doing these POST requests directly to
Twitter from your client, what you mean by "it fails" etc.. ?
Keep in mind that this being an Apache support forum, people here do not
necessarily have any idea about the Twitter REST API for instance.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache Mod Proxy with HTTP Post
am 12.09.2009 14:43:54 von MarkAtHarvest
Thank you for the response.. I haven't sniffed the packets, I need to look
into that. but the summary is if I make a HTTP POST request from browser to
twitter using apache PROXY it fails, it sends me a HTTP STATUS as 0.. and I
get HTTP Failed output..
If I do the same request, using the following PHP Proxy..
tweetr.serviceHost = "labs.swfjunkie.com/tweetr/proxy"; it works
please find the details..
My HTTP POST Request is http://mysite/tproxy/direct_messages/new.xml
contentType : application/x-www-form-urlencoded
requestHeaders :Authorization:Basic bWFya2F0aGFydmVzdDptaXJhY2xl
POST DATA
myusername, This is my samepl msg
HTTP Response I get is followingHTTP STATUS Code 0
From the Server Access Logs..[Sat Sep 12 08:30:38 2009] [debug]
mod_proxy_http.c(1909): proxy: HTTP: serving URL
http://twitter.com/direct_messages/new.xml
[Sat Sep 12 08:30:38 2009] [debug] proxy_util.c(2044): proxy: HTTP: has
acquired connection for (twitter.com)
[Sat Sep 12 08:30:38 2009] [debug] proxy_util.c(2102): proxy: connecting
http://twitter.com/direct_messages/new.xml to twitter.com:80
[Sat Sep 12 08:30:38 2009] [debug] proxy_util.c(2195): proxy: connected
/direct_messages/new.xml to twitter.com:80
[Sat Sep 12 08:30:38 2009] [debug] proxy_util.c(2347): proxy: HTTP: fam 2
socket created to connect to twitter.com
[Sat Sep 12 08:30:39 2009] [debug] proxy_util.c(2448): proxy: HTTP:
connection complete to 128.121.146.100:80 (twitter.com)
[Sat Sep 12 08:30:39 2009] [debug] mod_proxy_http.c(1686): proxy: start body
send
[Sat Sep 12 08:30:39 2009] [debug] mod_proxy_http.c(1775): proxy: end body
send
[Sat Sep 12 08:30:39 2009] [debug] proxy_util.c(2062): proxy: HTTP: has
released connection for (twitter.com)
MY Virtual Host Configuration is
ServerName myServer
ServerAlias myServer.com
DocumentRoot "/var/www/myServer"
AddHandler php5-script .php
AddType text/html .php
ProxyRequests off
Order Allow,Deny
Allow from all
ProxyPass /tproxy/ http://twitter.com/
ProxyPassReverse /tproxy/ http://twitter.com/
RequestHeader unset Accept-Encoding
#custom log file
LogLevel debug
ErrorLog /var/log/httpd/mysite.local.error.log
CustomLog /var/log/httpd/mysite.local.access.log combined
I will look into the packet sniffing, but not sure what to find over there..
awarnier wrote:
>
> MarkAtHarvest wrote:
>> I have configured my proxy as below
>> ProxyRequests off
>>
>> Order Allow,Deny
>> Allow from all
>>
>> ProxyPass /tproxy/ http://twitter.com/
>> ProxyPassReverse /tproxy/ http://twitter.com/
>> RequestHeader unset Accept-Encoding
>>
>> I am trying access Twitter webservice REST APIS from my client..
>> Everything works fine, if I make a HTTP GET request and I get a XML
>> response Back..
>> But my webService REST request for HTTP POST fails.. and Logs also do not
>> say anyting..
>>
> Hi.
> From the above, it is not very clear what is not working, or even if it
> is any problem of Apache, rather than a problem of your client or of
> Twitter (like, does it support POST ?).
> Can you please be a little bit more explicit about what you are sending
> where, what your client is, if you have looked at the packets being sent
> back and forth, if you have tried doing these POST requests directly to
> Twitter from your client, what you mean by "it fails" etc.. ?
> Keep in mind that this being an Apache support forum, people here do not
> necessarily have any idea about the Twitter REST API for instance.
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Apache-Mod-Proxy-with-HTTP-Post-tp2541 0994p25414139.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org