http

How to do authentication within a HTTP service?

We currently have a website that has user account functionality, but we are looking to provide an API to allow users to manage their accounts/perform actions via other devices/websites, by providing an API for common tasks. Currently the website login is done via HTTPS for security, and then managed using PHP sessions with suitable secu...

files served with content-disposition: inline still sometimes prompt for download

My subject line says most of what I'm asking. I've got a web site that outputs reports in various formats (HTML, CSV, TSV, Excel, etc). Whenever possible, I'd like these files to be shown in the browser. To that end, I've set up my headers so that "Content-Disposition" is "inline". This works very inconsistently with different file t...

Http get post guru help fiddler

I need help. I need log(safe full request) in iis 5(with headers etc) or look on it in proxy,fiddler etc I use fiddler/ I have web config Do you know HOW TO see ALL REQUEST,request from ALL PORTS and applications? Can y recommend me proxy or http debugger? I can not see request to my website in fiddler(((((( Maybe i need add property...

http based filesystem with seek and lock support

Hi - I'm building an application that needs to use a web server like a file system. Specifically, the ideal solution would be: A server side component that would allow, via HTTP, opening (locking), reading, writing, seeking and truncating one file. I need to be able to lock multiple files simultaneously. I need this to run on any o...

In a hypothetical ajaxed blog engine, which blog features could use asynchronous requests?

I'm trying to understand when I should use asynchronous web calls back to the server for data in an ajax app. I've never used ajax before so I'm still stuck with my idea of the stateful model of HTTP, having used it that way for over a decade. In a blog engine I'm writing as an ajax exercise, I'd like to add some asynchronous calls. ...

How do you transfer binary data with Python?

I'm working on a client-server program for the first time, and I'm feeling woefully inadequate on where to begin for what I'm doing. I'm going to use Google Protocol Buffers to transfer binary data between my client and my server. I'm going to be using the Python variant. The basic idea, as I understand, is that the client will serial...

C# - How to read a continuous stream of XML over HTTP

I am trying to figure out the best way to consume a continuous stream of XML data from a service that is sending the data as a "constant" feed over HTTP. I was considering using HttpWebRequest/Response but I am not sure how that will behave if the data just continuously streams. Any thoughts? ...

What should be the default version if I have many versions for a REST api ?

I have a REST api that will accept a version via a custom HTTP header or a request parameter. I'm doing this because I don't want the URI to contain the version like del.icio.us .e.g http://server/api/v1/... Now in my design, the HTTP header has a higher priority than the request param. What happens then if the user does not supply any ...

How to interpret HTTP Accept headers ?

According to the HTTP1.1 spec, an Accept header of the following Accept: text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c is interpreted to mean text/html and text/x-c are the preferred media types, but if they do not exist, then send the text/x-dvi entity, and if that does not exist, send the text/plain entity Let's cha...

Rails POST, PUT, GET

After I generate a scaffold, Rails gives me the ability to POST to items.xml which will create a new item. A GET to items.xml will simply list them all. Where does Rails specify which method in the controller (create or index, respectively) will be called, based on the type of action I am performing? More specifically, POST calls method...

WebDav connection/authentication with PHP

Okay, so the PHP script exists on serverA. ServerA has php safe-mode ON and WebDAV OFF. I can't change either of these factors. I want a script on serverA to get the user's login/password for another server, which we shall call serverB. ServerB has WebDAV ON. The ultimate goal is that the user will go to the script on ServerA, put in t...

Unescape Python Strings From HTTP

I've got a string from an HTTP header, but it's been escaped.. what function can I use to unescape it? myemail%40gmail.com -> [email protected] Would urllib.unquote() be the way to go? ...

Using HTTP OPTIONS to retrieve information about REST resources

This problem relates to the Restlet framework and Java When a client wants to discover the resources available on a server - they must send an HTTP request with OPTIONS as the request type. This is fine I guess for non human readable clients - i.e. in code rather than a browser. The problem I see here is - browsers (human readable) ...

C#/.NET: GETting a URL with an url-encoded slash

I want to send a HTTP GET to http://example.com/%2F. My first guess would be something like this: using (WebClient webClient = new WebClient()) { webClient.DownloadData("http://example.com/%2F"); } Unfortunately, I can see that what is actually sent on the wire is: GET // HTTP/1.1 Host: example.com Connection: Keep-Alive So http:...

Python3 Http Web Server: virtual hosts.

Hello, I am writing an rather simple http web server in python3. The web server needs to be simple - only basic reading from config files, etc. I am using only standard libraries and for now it works rather ok. There is only one requirement for this project, which I can't implement on my own - virtual hosts. I need to have at least tw...

Will HTTP Compression (GZip or deflate) on a low traffic site actually be beneficial?

I have a web application where the client will be running off a local server (i.e. - requests will not be going out over the net). The site will be quite low traffic and so I am trying to figure out if the actual de-compression is expensive in this type of a system. Performance is an issue so I will have caching set up, but I was consi...

File download servlet behaving differently with IE on clustered server

I have a servlet that sends a file by setting the HTTP Content-Type to "application/zip", the Content-Disposition to "attachment" and writing it on the response's OutputStream; it behaves correctly when deployed on my local application server, making the browser show the popup to choose wheter or not to download the file. However, when ...

Why should you delete using an HTTP POST or DELETE, rather than GET?

I have been working through Microsoft's ASP.NET MVC tutorials, ending up at this page http://www.asp.net/learn/mvc/tutorial-32-cs.aspx The following statement is made towards the bottom of this page: In general, you don’t want to perform an HTTP GET operation when invoking an action that modifies the state of your web application. ...

Can't stream Jpegs images over http in C#

Hello Guys, I 've a stream of Jpegs images and I'm trying to stream them with HTTP to VLC The code if the following: public HttpListenerResponse StartListening(String where) { listener = new HttpListener(); listener.Start(); Console.WriteLine("listening on " + where); listener.Prefixes.Add(where); ...

What can cause TCP/IP to drop packets without dropping the connection?

I have a web-based application and a client, both written in Java. For what it's worth, the client and server are both on Windows. The client issues HTTP GETs via Apache HttpClient. The server blocks for up to a minute and if no messages have arrived for the client within that minute, the server returns HTTP 204 No Content. Otherwise,...