http

What are the drawbacks on the client and back end when using Comet/persistent HTTP connections?

I am developing an application which requires real-time updates to the end user. However, I am not sure of the consequences of having a persistent HTTP connection. Does the browser limit the number of connections one can have? Is it alright for the back end server to have thousands of persistent connections? What happens if I don't us...

tools for developing RESTful web services

What tools are recommended to aid in developing RESTful web services? For instance, a good front end for manually calling REST APIs, and a TCP/IP or HTTP monitoring tool seem like good starting points. I am looking for specific product recommendations. OS X recommendations would also be helpful. ...

Dynamically load insecure content to avoid dialog

I'm working on an app that will be using https, but we wanted to be able to use the google search api. They do not have an https version available, so it causes the browser to display an insecure warning dialog. It was suggested that we could dynamically load the script after initial load to avoid the warning. I didn't think that would w...

What are best practices for activation/registration/password-reset links in emails with nonce

Applications send out emails to verify user accounts or reset a password. I believe the following is the way it should be and I am asking for references and implementations. If an application has to send out a link in an email to verify the user's address, according to my view, the link and the application's processing of the link shoul...

Destroying $_SERVER session?

Okay so I'm not using any session variables, rather my code looks like this: if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="Enter your Twitter username and password:"'); header('HTTP/1.0 401 Unauthorized'); echo 'Please enter your Twitter username and password to view your followers.'; ex...

Prevent flex from caching an external resource

I'm writing a flex application that polls an xml file on the server to check for updated data every few seconds, and I'm having trouble preventing it from caching the data and failing to respond to it being updated. I've attempted to set headers using the IIS control panel to use the following, without any luck: CacheControl: no-cache...

Consuming non-REST APIs in Rails with ActiveResource

Hi, I'm writing a client that consumes a non-REST API (i.e. GET site.com/gettreasurehunts), which requires that I specify all parameters (even the resource ID) in the request's HTTP body as a custom XML document. I'd like to use Rails and ActiveResource, but I'd be forced to rewrite almost all of ActiveResource's methods. Is there anot...

Is there a free/open source wget-like Windows program with graphical progress?

I am writing a WiX-based installer for our software. I need to download some non-trivial dependencies (like Sql Server Express 2008), then install them. I could just use wget, but having the console open to show progress could be very confusing for non-technical people. Instead, I have been looking for a program that works just like w...

How does HTTP Adaptive Bitrate Streaming work on the iPhone?

Apple has included HTTP Adaptive Bitrate Streaming in the iPhone OS 3.0, in particular Safari handles this automatically. I'd like to play with this in a low cost manner, but I expect it'll require a custom HTTP server in the worst case, and interesting PHP/etc scripting in the best case. But first I need to know what the protocol diff...

Is it possible in Google Earth to embed HTTP text/HTML output into a Placemark's balloon description area?

I'm displaying KML placemark data in Google Earth via a NetworkLink, and would like to keep the size of the KML down by not including the description text in the Placemarks' KML definitions. Instead, I would like to retrieve and embed remote HTML text (via an HTTP request) only when the balloon window is activated. Is this possible? I k...

Concurrent Net::HTTP.get to same domain

As part of my Ruby on Rails application, I need to perform several (a few dozen) web requests to a foreign web server -- all on the same domain. I am aware of the two requests per domain throttle on Windows and know how to adjust that, but this application is running on CentOS and I was not expecting to run into this same issue, but I se...

How to download a picture using ruby

Let's say that I want to download this picture using ruby. How do I do that? http://farm1.static.flickr.com/92/218926700_ecedc5fef7_o.jpg I am using mac. ...

Harvesting Dynamic HTTP Content to produce Replicating HTTP Static Content

I have a slowly evolving dynamic website served from J2EE. The response time and load capacity of the server are inadequate for client needs. Moreover, ad hoc requests can unexpectedly affect other services running on the same application server/database. I know the reasons and can't address them in the short term. I understand HTTP ...

Iframe vs normal / ajax get request

I have a page that gathers environment status from a couple of IBM WebSphere servers using iframes similar to this: <iframe src="http://server:9060/ibm/console/status?text=true&amp;amp;type=server&amp;amp;node=NODE&amp;amp;name=ServerName_server_NODE"&gt;&lt;/iframe&gt; and it happily prints out "Started" or "Unavailable" etc. But if I...

how do I download a large file (via HTTP) in .NET

I need to download a LARGE file (2GB) over HTTP in a C# console app. Problem is, after about 1.2GB, the app runs out of memory. Here's the code I'm using: WebClient request = new WebClient(); request.Credentials = new NetworkCredential(username, password); byte[] fileData = request.DownloadData(baseURL + fName); As you can see... I'm...

Recommendation for a C/C++ HTTP client library for Windows Mobile 6 ?

I'm trying to port a win32 application to Windows Mobile 6 / 6.1 / 6.5. It uses winhttp which doesn't appear to be available on the mobile platforms. My initial thought was to replace it with WinInet - but I wondered if anyone had a better idea? ...

Reading data from an open HTTP stream

Hi, I am trying to use the .NET WebRequest/WebResponse classes to access the Twitter streaming API here "http://stream.twitter.com/spritzer.json". I need to be able to open the connection and read data incrementally from the open connection. Currently, when I call WebRequest.GetResponse method, it blocks until the entire response is d...

Different configuration per URL in silverlight

I need to change database and settings when my customers load the application (xap) on different URLs. Examples: client A connects on URL: www.clienteA.com/system client B connects on URL: www.clienteB.com/system The two urls above call the same xap file, but I need to change database and settings; how I do that? ...

How can I send a 301 Permanent Redirect with ASP.NET ?

I need to permanent redirect some pages, and redirect the user to the new URL as well. This code only sets the correct headers. The user are not redirected. public static void PermanentRedirect(this HttpResponse response, string newUrl) { response.Status = "301 Moved Permanently"; response.StatusCode = 301; response.AddHeader("Lo...

httpclient 4 how to get bytes

HttpGet httpget = new HttpGet("http://www.google.com/"); System.out.println("executing request " + httpget.getURI()); // Create a response handler ResponseHandler<String> responseHandler = new BasicResponseHandler(); String responseBody = httpclient.execute(httpget, responseHandler); this will get responseBody as...