http

urlopen error 10045, 'address already in use' while downloading in Python 2.5 on Windows

I'm writing code that will run on Linux, OS X, and Windows. It downloads a list of approximately 55,000 files from the server, then steps through the list of files, checking if the files are present locally. (With SHA hash verification and a few other goodies.) If the files aren't present locally or the hash doesn't match, it downloads t...

HTTP_Request using cURL or Pear (PHP) on XML Page

Hello all, I am not well-versed in HTTP requests. How can I, using PHP, grab and parse the information from this XML page, using a GET HTTP Request? http://heywatch.com/encoded_video/1850189.xml Basically, this is a video that was encoded, and I am trying to pull some of the values from the recently encoded video. More specifical...

HTTP and HTTPS Protocols

Hi, my question is related to hypertext protocol. what is the requirements from my side to be able to use HTTPS instead of HTTP in the areas where a user will enter confident information or when there is a registration process. Thank you. ...

Measure Java's HttpConnection steps (header & body) for metric analysis?

Scenario I'm doing analytics of a data connection being made via Java's HttpConnection. Specifically, I want to measure: Time it took to receive the response header (not the full response) Time it took to download the data (not the full request, the response) To me, it seems as if the HttpConnection class is not sophisticated enough ...

Setup Http Post Server

I have a mobile application which I want to call a http post to pass a binary string and write it to a SQL Server. Can you please give me some examples of code in setting up a http post server (Server side code) to accept 2 values (brinary string & DeviveID string). Any help, advice or links welcome.... ...

Redirect on record not found?

On the book Agile Web development with Rails, it is proposed that when someone tries to access some data in your web site and the record doesn't exist anymore, that the user should be redirected to a working page and display a message. A user would go to /book/1, but a book with id 1 doesn't exist anymore, so it is redirected to /books...

NSURLConnection delegate gets called after caller functions control is finished

i am following code from apple examples. this code is used in a method called login and i call this method from another class ABC. My problem is this when i call the Login method it will execute the code NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if (theConnection) { received...

httpconnection.getResponseCode() giving EOF exception

Hi, Im using Httconnection for connecting to webserver , somtimes request fails causing EOFException when calling httpconnection.getResponseCode(). im setting the following headers while making the connection HttpConnection httpconnection = (HttpConnection) Connector.open(url .concat(";interface=wifi")); httpco...

YFrog API no longer supports public/private option?

I'm tring to use YFrog's API to upload a picture. The documentation is as follows http://yfrog.com/api/upload Use this method if you only want to upload a photo or video to yfrog. Request fields (post data should be formatted as multipart/form-data) media - Binary image or video data; either media or url para...

Recommended method to download tweets based on search terms and store

I would like to download tweets based on certain search terms. I'm aware of HTTP GET and such techniques, but I'm not sure the best way to create a simple executable that downloads the tweets and saves them for subsequent analysis. Any ideas? I'm a basic programmer - if you say "use curl" I know roughly what you mean but not how to set...

RESTful API response status code disambiguation

I'm developing a RESTful API and have a question about the most appropriate response status codes for certain scenarios. Consider the case where the client makes a GET request for a resource. How can I disambiguate a "not found" response for the case where the resource legitimately does not exist, vs. the case where there may be a minor...

HTTP packet reconstruction

If I have a large HTTP packet which has been split up into a number of TCP packets, how can I reconstruct them back into a single HTTP packet? Basically, where in the packet do I look to tell when a HTTP packet is starting/ending? I can't seem to see any flags/fields in the TCP header that denote the start or end of the HTTP packet. ...

Android: HTTP/JSON communication within application or separate thread?

I've an application which receives and sends data (JSON) from/to a HTTP server via HTTP POST requests. There is not really any payload except of a few strings, so I'm wondering if it would make sense to build this whole HTTP communication as an Android Service or just to create a separate thread within my application? ...

Good high-level python ftp/http lib?

I'm looking for a good, high-level python ftp client/server library. I'm working on a project that has "evolved" a small http/ftp library on top of ftplib/urllib/urllib2 from what was originally one function, and almost none of it was designed to be built upon. So now it's time to refactor kind of seriously, and I'd like to just switch t...

Android: Has anyone solved the localhost HttpClient Connection Refused error?

I was just wondering if anyone solved this problem. Googling gives tons of posts having this question but not one with a proper reply. I tried literally every combination of the following two pieces of code with and without proxy: /*********** URL METHOD ***************/ //URLConnection conn = aURL.openConnection(); //conn.connect(); ...

Detect if visitor is a browser and not a crawler

Hi How would I server side detect if the user of the webpage is a browser? The reason for detecting this is, that I'm storing statistics about visited pages and I don't want to store any statistics when the user is a crawler. So I'm not trying to detect which browser vendor. I only want a boolean answer, is the user a browser. I assum...

Cancelling an HTTP authentication login?

Im working on a site that uses an old school http authentication log in. The problem is if someone reached the log in prompt by mistake and presses the cancel button the log in box disappears and then reappears a total of 3 times before sending the user off to an ugly "authentication required" page. Does anyone know how to tweak the lo...

Find out HTTP method in PHP

How can I find out which method (usually GET or POST) is used for the current request? ...

HTTP Download very Big File

I'm working at a web application in Python/Twisted. I want the user to be able to download a very big file (> 100 Mb). I don't want to load all the file in memory (of the server), of course. server side I have this idea: ... request.setHeader('Content-Type', 'text/plain') fp = open(fileName, 'rb') try: r = None while r != '': ...

Perform an action and redirecting to the same URL doesn't refresh the page

We are working on a new web site using Apache, Python and Django. In the development phase, no problem but once binding to Apache, using Firefox 3.5.3, we got a strange problem. We stand on : http://website.fr/search/ When we want to change the ordering of the research, we are sending the user to : http://website.fr/search/order/pri...