http

Does Google have an API for its search engine?

Input a query, and Google's API will give me an XML of results? ...

Error Page Return a Status Code 200 default response

We would like to implement a "fault barrier" strategy for managing exceptions in our applications. One thing our applications have is the concept of a "passback" response, basically a no-op, which we'd like to return in preference to throwing 500, 400, etc. HTTP status codes - e.g. our external facing applications should always return a ...

How to ignore "Content-Disposition: attachment" in Firefox

How can I cause Firefox to ignore the Content-Disposition: attachment header? I find it absolutely annoying that I can't view an image in the browser, because it asks me to download it. I don't want to download the file, I just want to view it in the browser. If the browser doesn't have a plugin to handle it, then it should ask to downl...

Is there anything like request_uri from ActionController::Request in Rails for Rack?

I wrote a rack middleware for my rails that that does something based on the if the REQUEST_URI equals specific string. However what I quickly found out was in my development environment, which is using WEBrick, is the server puts in the full url for the REQUEST_URI. On my production environment, which is on Heroku, it behaves like exp...

Is there a minimal message queue?

Hi, I'm searching for a minimal message queue project. With minimal I mean something along this: No/Minimal setup / administration Uses http (so I don't need protocol/queue specific libraries/code) (Persistence would get extra points ;) (It should run on linux.) Is there such a project available? I once heard about a message queu...

Running an ASP app in IE with OpenLayers - tile requests getting redirected to ASP web server?

I'm currently developing an ASP application, which is running on an ASP.NET Development Server. When I bring up a particular page in IE (it has an OpenLayers map on it), sometimes the tiles won't load. When this happens, I've noticed that opening another tab and going to the address of the tile (or even, say, Google) results in a standa...

Inserting user credentials in HTTP request header

I'm trying to insert user credentials into an HTTP request header which is then sent via https to a web service, which in turn reads them for authorization purposes... Client and Service are both written in Java. On the client side I do the following: ExampleImplService service = new ExampleImplService(); Example port = service.getExa...

PHP: SSL HTTP Authentication?

I have a php page in which I have the following code to validate the user using HTTP authentication, this code works fine for http:// url's but when I use the same page with https:// then it didn't ask for username and password. //authentication settings define('USERNAME', 'prashant'); define('PASSWORD', 'password'); //Validating if (!...

How can I see the current POST Request's content?

Hi, Using the current HTTP Context, how can I see the content of the current POST request that has just been posted to the server? ...

Can I use glib to make some portable http GET request and how ?

Hi there, Was just wondering if any of you already coded a http get request using glib? Is it possible and how ? I just want to call an simple urls with parameters, and the code must be working on gnu/linux, windows and mac. If it is not possible with glib, have you any suggestion about what to use for that purpose (in a portable pers...

Elastic Load Balancing

Hi, I am wondering if there is a way to do elastic load balancing. I have read about HAProxy but it seems I need to bring down HAProxy to reconfigure it to work with more or less machines. To make the picture more clear: I have a cluster of web backends (lets say apache + mod_rails). I can monitor the usage of the backends and bring up...

Broken images in XSS attacks

Many websites discuss broken images being good warning signs of a possible XSS attack in the pages source code. My question is why so many attackers allow this to happen. It doesn't seem like it would be very much more trouble for an attacker to use an iframe or an unassuming picture to hide their persistent script behind. I could be ...

handling a redirect from a cross-origin post in AJAX

We are trying to create a RESTful API that will be hosted on server x.foo.com. Client html applications (built in jquery) will be hosted on y.foo.com. I am dealing with cross-domain issues by setting the Access-Control-Allow-Origin header as described here http://www.w3.org/TR/cors/. So far so good, and I can now successfully make AJAX...

Website Script that will click on button every x seconds...

Is there an easy way of automating clicking on a certain button on a website? I'm trying to help someone in my company out, the guy basically stares a booking page the entire day, having to click on a single button to refresh the page. If new booking slots becomes available, then it will only be shown on the page on the page refreshes, ...

Does an implementation of RFC 3229 (Delta encoding for HTTP) exist ?

As mentioned briefly in this article: http://en.wikipedia.org/wiki/Delta_encoding#Delta_encoding_in_HTTP which is referenced from here: http://tools.ietf.org/html/rfc3229 I'm currently a CompSci student and would like to try this out, partly for research and partly for fun. Google hasn't returned much in terms of further discussion o...

How do I make a raw HTTP request in Java?

I want to make a basic HTTP request using these tokens: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html I know Java does it for you normally, but I want to specifically set certain tokens. ...

How many video formats would I need? - Web

Hi folks, I'm wondering how many different formats for each video would I need in order to support all major devices? Among the major devices I'm thinking: Android phones + iPhone + iPad. Is it also good practice to encode videos with different bitrates? There is too much conflicting info out there, and I am really confused. Any i...

Image uploading from Python or cURL to Tumblr?

I'm working on a project that involves uploading an image to tumblr from Python. I've had luck using Tumblr's API( http://www.tumblr.com/docs/en/api ) in doing regular text-posts, but image uploads have been giving me trouble. The error messages their server returns have been limited to just telling me that there was an "Error Uploadin...

PUT Variables Missing between Python and Tomcat

I'm trying to get a PUT request from Python into a servlet in Tomcat. The parameters are missing when I get into Tomcat. The same code is happily working for POST requests, but not for PUT. Here's the client: lConnection = httplib.HTTPConnection('localhost:8080') lHeaders = {"Content-type": "application/x-www-form-urlencoded", ...

Accessing the exact data sent using WebClient.UploadData on the server

Hey All, Newbie question: I'm sending a large text string in the form of a byte array using the WebClient.UploadData method to a web site but I'm not sure exactly where to retrieve that data from on the server. I've read posts that say it is in the request object which I already know but how exactly do I retrieve the specific byte array...