http

Python 3 Get HTTP page.

How can I get python to get the contents of an HTTP page? So far all I have is the request and I have imported http.client. ...

Make a website adaptable for iphone

I am owning some websites, in php, java and html coded. I want them to be viewed comfortably using iphones. ie, the site has to first check whether the site is hit from a pc or mobile (iphone). If its from a mobile, it has to be redirected to another server which loads the mobile view. Some sites i've recently found of doing the same is ...

How to let Server Notify Client Behind Firewall

I have the case where I have a public facing service sitting out on the internet and I would like the ability for the server to contact specifically design embedded devices that are sitting in normal home networks when required. I know that the devices can poll the server to get updates etc but 1) There will be a lag between when server...

Async data fetching from Java WebService

Hello I'm implementing a client-server GPS application. Client side is a J2ME midlet that sends GPS location via HTTP/XML to a Java Webservice (Tomcat servlet). The servlet stores positions in SQL database. The other client app is a web browser that can login and see the actual position of midlet using Google Maps. This client is writte...

Python urllib2 Progress Hook

I am trying to create a download progress bar in python using the urllib2 http client. I've looked through the API (and on google) and it seems that urllib2 does not allow you to register progress hooks. However the older deprecated urllib does have this functionality. Does anyone know how to create a progress bar or reporting hook usin...

Can PHP detect the status code that it has or is preparing to send to the browser?

I am sending a status code via the header function, such as header('HTTP/1.1 403');, and would like to in another area of my code detect what status code is to be sent (in particular if I have sent an error code of some nature). As has been mentioned elsewhere, headers_list() does not return this particular item, and it's unclear to me i...

Any way to set request headers when doing a request using urllib in Python 2.x?

I am trying to make an HTTP request in Python 2.6.4, using the urllib module. Is there any way to set the request headers? I am sure that this is possible using urllib2, but I would prefer to use urllib since it seems simpler. ...

Problems with files on separate domain not loading for random periods of time

I have a separate domain name for static content such as images, js files, and css files. I load this static content on the main site from this other domain to double the amount of concurrent connections the browser makes to load the page faster. This seems to work and I haven't had any issues myself, but I've been getting e-mails from...

Http request response debugging

I have two phones connected to a Wifi access point, both have ip in the private range. One of the phones has a HTTP server running on it and the other phone acts like a client. The client sends GET requests data to the server as name/ value pairs in the URL query string. At the moment the server is only sending on HTTP.OK on receiving th...

Want to use both GET and POST methods.

Hi, I know result page that uses GET method can be bookmarked while the one using POST cannot be. I also know about the restrictions of the GET methods. Now suppose I want to build a search engine which by default uses GET allowing users to bookmark but when the length of the search phrase exceeds the limit, switch to POST. On the ser...

What is the best way to secure a RESTful API to be accessed on an iPhone.

I am looking for some suggestions on how to secure access to a RESTful API which initially be used by an iPhone application, but will have other clients in the future. The data exposed by this API must be kept secure as it may contain health information. All access will be done over HTTPS. I was thinking that I'd like to require pre-reg...

HTTP parallel requests and AJAX/polling

Okay, so we all know that most modern browsers (without tweaking) are set to 4 parallel HTTP requests at a time to a single domain/subdomain, but how does long-polling AJAX affect this? Say I have a long-poll on a 15 second interval. While the browser is waiting for a response during those 15 seconds, does that still eat up one of the 4...

Stand alone web server vs Apache/IIS

I'm developing a rather complex application with both win32 and web access. Server side implementation is custom, and it's going to be hosted in our company. The HTTP server could be implemented as a stand alone Indy (or another) HTTP server or more traditionally with Apache/IIS. I'd like to know what are the advantages/disadvantages of...

ASP.NET Ajax-enabled WCF Service, how can I 'post' instead of 'get'?

Hi All, I'm using a simple ajax-enabled WCF service. I'm creating a string of XML on the client and doing a get (by default). Here is the code. I see the 'WebGet' attribute, but there's no 'WebPost' [OperationContract, WebGet(ResponseFormat = WebMessageFormat.Json)] public string PrepareDoc(string inputXML) { var arg ...

IE8 fails at displaying the page completly

When I open my project, Only the background and a image not found item are shown, while the page is 100% xhtml 1.1 strict. The developer tools show IE stops rendering after the SVG logo... Firefox works as it should. Damn You IE! ...

How keep-alive of HTTP can/is play role in AJAX application

"keep-alive" its there in HTTP. Some says it good should be used, but i am unable to get to any conclusion. So please provide your input/answer/views so i can get some ground for this, What it does? Scenario where it should and should not be done? How it can make AJAX application better ? Risks DO's and DONT's if any? Thank you all f...

Scripting HTTP more effeciently

Often times I want to automate http queries. I currently use Java(and commons http client), but would probably prefer a scripting based approach. Something really quick and simple. Where I can set a header, go to a page and not worry about setting up the entire OO lifecycle, setting each header, calling up an html parser... I am looking ...

Is is possible to spoof a session with JavaScript + Cookies?

Suppose you have a webapp that gives users their own site on a subdomain (eg: awesome.super-cms.com) and that you let them edit HTML. Further assume that you're setting the SessionID in a wildcard subdomain cookie ("*.super-cms.com") The user who manages evil.super-cms.com could easily write a JavaScript that grabs the SessionID from o...

Blackberry http connection not working on 3g

hi friends i'm a newbie in blackberry programming and have managed to make a small application... The application downloads an xml file through http and parses it and displays it on the screen... now the problem is that though it works fine on my simulator... the client complains that he's getting an error in connection if he connects it...

URL matrix parameters vs. request parameters

I'm wondering whether to use matrix or query parameters in my URLs. I found an older discussion to that topic not satisfying. Examples URL with query params: http://some.where/thing?paramA=1&paramB=6542 URL with matrix params: http://some.where/thing;paramA=1;paramB=6542 At first sight matrix params seem to have only advantages:...