EHM
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by EHM
-
-
QUOTE (rolfk @ Mar 27 2009, 03:34 PM)
Not sure about your proxy but I did not add the Host: xxxxxxxxxxxx in the past to my proxy requests and that worked. The Host can be added according to the RFC for forward compatibility but I don't think it is required. The absolute URI however seems to be at least for older HTTP versions a requirement. I did however use HTTP/1.0 as version indication so maybe that is why.And last but not least: are you sure there is an index.html document on the server. It could be index.htm or something entirely different so as a start I would try just the server address http://www.example.com/ without any document path.
I've tried to make a HTTP/1.0 request to http://www.example.com/ through the proxy server by accessing directly to the IP address, but it is still not working.
However, "Host" is a necessary field if it is HTTP/1.1 request
Now, I'm trying "DataSocket Read" function by passing in the full URL of the web page.
It seems like it is working..
-
QUOTE (rolfk @ Mar 18 2009, 09:03 PM)
Thank you for your explaination.
However, there is another question which I would like to ask.
I'm doing a HTTP GET Request as follow:
GET http://www.example.com/index.html HTTP/1.1
Host: www.example.com
The proxy server IP is xxx.xxx.xxx.xxx:80.
I pass the Proxy IP as input to "TCP Open Connection" with Port "80".
Whereas the HTTP Get Request as mentioned is passed as input to "TCP Write".
I received error code 404, indicating that "index.html" which I'd requested was not found.
It seems like the request was not directed to the destinated host.
In a normal internet browser, we do not access to this proxy server directly. Instead, we are using a Javascript Auto-Proxy Configuration.
Does it really matter if I'm doing a direct connection to the proxy server in this case?
Thanks,
Mean
Simple HTTP Client
in Remote Control, Monitoring and the Internet
Posted
QUOTE (EHM @ Apr 1 2009, 03:46 PM)
Ok. After testing by using "DataSocket Read" function, all general web pages can be accessed without problem.
However, there is another question here.
What I'm trying to do here is to make a HTTP request to Yahoo! Maps to query for the geocodes of a particular location.
This is an example of url which includes an application id (appid), street, city and state information.
http://local.yahooapis.com/MapsService/V1/...le&state=CA
This link works properly when access using a normal internet browser.
When I passed this url into the input of "DataSocket Read" function, error 42 was returned.
One thing that puzzled me is when I passed in a normal google search URL, it works.
for eg: http://www.google.com.sg/search?hl=en&...mp;aq=f&oq=
The only difference between the two URLs is the existence of the Application ID in the query string.
Appreciate for any advice and comments given.
Thanks.
Mean