http

problem connecting to remote web service

Hello, I was trying to connect to a fax web service, so that I can access the features of the fax server... This web service is a "wsdl" file accessed through tomcat server, it is under the "webapps" folder. when I try to call the web service using http, I face the following problem: Client found response content type of '', but expected...

Downloading a webpage using urllib2 results in garbled junk? (only sometimes)

How come I hit this webpage, I get HTML text: http://itunes.apple.com/us/app/mobile/id381057839 But when I hit this webpage, I get garbled junk? http://itunes.apple.com/us/app/mobile/id375562663 I use the same download() function in python, which is here: def download(source_url): try: socket.setdefaulttimeout(10) ...

curl + jsecurity authentication

I have a grails app that is using jsecurity plugin for authentication. How do I use curl to send my credentials? If I just do curl -u username mysite I get a prompt for a password, then nothing. I tried to do an anyauth command and this is what I got for the site. Any idea why it is returning a 302? dcole@DCOLE-L /cygdrive/c/dev $ cu...

Copying file uploaded vai PHP's HTTP Get in PHP 4

Hello, I have been working on adding functionality to a site originally written in PHP 4.4.9. It's not in their budget to port the site to PHP5, so don't even suggest it. (Although it needs it badly). The problem I am facing is how to copy binary data from a GET request to a file location on the server. The code that is currently writte...

How can I send cookies with Perl's LWP::Simple?

use LWP::Simple; use HTML::LinkExtor; use Data::Dumper; #my $url = shift @ARGV; my $content = get('example.com?GET=whateverIwant'); my $parser = HTML::LinkExtor->new(); #create LinkExtor object with no callbacks $parser->parse($content); #parse content now if I want to send POST and COOKIE info as well with the HTTP header how can I co...

HttpWebResponse LastModified

Is the HttpWebResponse.LastModified accurate? Is it always present? My project is to create a sort of a focused web crawler and I am stucked if I will use the hash value of a resource or just the HttpWebResponse.LastModified property to check the resource's "freshness". Using the hash value means streaming the resource every time it's c...

Python: how to make HTTP request internally/localhost

I want to send some parameters from a python script on my server to a php script on my server using HTTP. Suggestions? ...

Using HTTP port to evade firewall

I'm creating a client-server application which communicates via a custom socket protocol. I'd like the client to be usable from within networks that have a restrictive firewall (corporate, school, etc.). Usually this is done by connecting via HTTP, since that's always available. If I want to do that, do I really have to use HTTP or is i...

HTTP URL token standard

I need to develop a feature in the system which allows unregistered users to get one-off system access via URL token that is generated/sent by an authenticated user. For example, a user logs in and wants to share a piece of information so the system generates a URL like http://host/page?token=jkb345k4b5234k54kh5345kb34kb34. Then this UR...

How is http post method implemented ?

Hello, I know want to know what happens behind the scene of a HTTP post method. i.e browser sends a HTTP post request to a server side script in PHP (eg). How does PHP's $_POST variable get the values from the client. Could someone explain in details or point to a guide. Regards, Mithun ...

Is utf-8 safe for the http?

Hi, if I have utf-8 encoded data, is it safe to send them in a HTTP body? The thing is that utf-8 data could include control characters including the null character (binary zero), which are not allowed by http RFC of course. So what to do with such data? Encode them with base64? On the other side the data, which I have in utf-8 is XML ...

Is it possible to use HttpBrowserCapabilities from a c# console application?

I need to parse UserAgent strings from a console app and this seems like a simple way to do it, but I obviously don't have an HttpRequest object and can't seem to make a fake one with a User-Agent header (I get platform not supported exception). Is there any way to do this, or should I start exploring other alternatives to user agent par...

Create HTTP post request and receive response using C# console application

I need to post data to a URL (https://somesite.com) to download file in responseStrem based on the parameters I posted. How can I do that using a C# console application? Parameters: filename, userid, password, type ...

POST vs GET methods - at the network level, which is more impacted by latency?

Is there any difference in network communication for HTTP GET and POST requests? With GET, I understand that the entire request is sent in one go. With POST, I think the initial request is sent, and then a second request is sent which sends all the parameters. For example, assume that the latency between server and client is 500ms. Wha...

Differences between a HttpURLConnection and a browser connection

I'm trying to connect to a web page through a HttpURLConnection but it's not responding the same as a regular browser (firefox, chrome). I'm getting an error 500. With the same code I can get "anyother" page (google, for example). My code is posted below, but I'm pretty sure it is ok. Using "Live HTTP Headers" firefox addon I sent the...

Are the HTTP methods different in 1.1 and 1.0?

Greetings all, I've been told by co-workers that the GET method is different in HTTP 1.0 and 1.1. The way it was explained to me was that in HTTP 1.0 GET does not have a body, ergo you cannot add additional information in the body. All of the variables have to be specified in the URI as CGI type variables. However, in HTTP 1.0 GET all...

> sign inside OBIEE GO URL?

Hello, I am trying to use a '>' symbol inside a GOURL to retrieve a report in PDF format automatically to users desktop. I'm actually using a perl script to programmatically request the login page, login using my credentials, and then I use a go url to download pdf report, sending it parameters,(doing URL encoding which includes convert...

Second request from Media Player in a web page

I have an ASP.NET web application where a Microsoft Media Player object on the page (in IE) is issuing a request for an .aspx web page. In the page I use TransmitFile to send back the audio file. This works fine most of the time. But, in some cases (a combination of IE version and a specific client, at least from what I can see) there...

Started Playing with node.js. I have a question

Hi, I just created a HTTP server using this code fro the documentation: var sys = require("sys"), http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World!"); sys.puts('Connection'); }).listen(8080); sys.puts("Server runn...

Dumb question about cookies

I have little experience with web programming and I am implementing an interface where I sent a HTTPS POST Request (with user/password), receive a XML, then I send another HTTPS POST Request (with an additional "passcode" dependent on the XML), receive a XML, (then I am logged in) then I send a HTTPS GET request and get an XML (the data ...