http

Hosting a WCF service behind a proxy, firewall

We have created a WCF using net.tcp with an anticipation that the service can work in a firewall that would accept only HTTP port. The client behind firewall can also access it. Do we need to host the service on a static, public IP so that any client from any network can conect to it? Ideally, we would like to host the service on a no...

In HTTP, Prompt to Save and XML File Rather Then Render

In a Web Application I am creating, users can backup their data locally. The backup data is an XML file. At the moment, most browsers try to display this file. What should I change in the HTTP response to suggest to a user-agent that the file should instead be saved? ...

Django HttpResponseRedirect reverse function in tutorial

Can someone please explain what is going on here with the Django Tutorial Part 4 Specifically, how the map function is working? I understand that URLs shouldn't be hardcoded in the view functions. return HttpResponseRedirect(reverse('mysite.polls.views.results', args=(p.id,))) ...

Does an http request always complete?

If an http request is made and the caller abandons the request does it get completed anyway? For example an asynchronous JavaScript GET request to log a banner click in the DB then redirect. Does the script need to wait for the response? ...

What is a safe amount of time that I can wait before responding to a browser, without getting a Timeout?

I'm making a chat application that works with long-polling to emulate a "push" from server to client. Basically, the browser asks for updates, and I reply if there's something new. Otherwise, I keep the connection open without responding until there is something to send back. Now, if 30 seconds have passed and I haven't sent anything, ...

How do I get the contents of an http request in Ruby?

In PHP I can do this: $request = "http://www.example.com/someData"; $response = file_get_contents($request); How would I do the same thing in Ruby (or some Rails method?) I've been googling for a half an hour and coming up completely short. ...

Get http variable JSF

Hello everybody, I have a question about JSF and GET http request. How can I get a GET variable in bean managed by JSF ? I tried to use it but nothing is in the map. FacesContext.getCurrentInstance().getExternalContext().getRequestMap(); Thanks for your answers. ...

Can browsers download two components in parallel per subdomain?

I know that: "browsers can download two components in parallel per hostname" example www.example.com & www.example.org My question is: can browsers download two components in parallel per subdomain ? www.example.com & images.example.com ...

Redirect to referer cache problem

Hello, everyone. We've faced strange problem. We have log on service, that authenticates user, adds auth cookie and, finally redirects user to the page she posted to this service from. So almost in all cases everything is OK. But on sometime on some random machine occurs a bug in this logic. Source page look and feel differs if user is...

Where can I find the default timeout settings for all browsers?

I'm looking for some kind of documentation that specifies how much time each browser (IE6/IE7/FF2/FF3, etc) will wait on a request before it just gives up and times out. I haven't had any luck trying to get this. Any pointers? Thanks! Daniel ...

Where and why asp.net changes error response?

I want my ASP.NET MVC application return HTTP response with code 400 and description of the error as body. My code is: response.StatusCode = 400; response.Write("Some error"); response.End(); When I test this code on localhost, I get expected result. But on remote server, response text contains just text description of the error, in t...

Downloading Multiple Files Form Single Dir

Hello :) I'm a little lost for words atm so I'll try to use made-up code to explain what I'm trying to do... foreach file in http://host.com/directory1/directory2/ download file Does that make any sense? I'm trying to download all files from a specified directory from a web server where my website's hosted. I know how to download ...

Can I "disable" git-clone over http?

I'm using git to manage a tiny project. I've been performing all of my transactions (clone, push, pull, etc) through SSH, but recently ran git-update-server-info because I wanted to experiment with running git-clone over http. It worked great. Cool. Now I realize though that anyone can clone my repository over http without any creden...

Parse an HTTP request Authorization header with Python

I need to take a header like this: Authorization: Digest qop="chap", realm="[email protected]", username="Foobear", response="6629fae49393a05397450978507c4ef1", cnonce="5ccc069c403ebaf9f0171e9517f40e41" And parse it into this using Python: {'protocol':'Digest', 'qop':'chap', 'realm':'[email protected]', '...

Strategy for maintaining complex filter states?

I need to maintain a list of filtered and sorted objects, preferably in a generic manner, that can be used in multiple views. This is necessary so I can generate next, prev links, along with some other very useful things for the user. Examples of filters: field__isnull=True field__exact="so" field__field__isnull=False Additionally, a...

Write a C# script to test hundreds of domain names

A client has given me a spreadsheet of hundreds of domain names. My task is to determine the following about each: Which domains are connected to a web server / website. Of those that are, which redirect to another site. What is the server software running (ASP, ASP.NET, Apache, etc) ...and output the results in an organized fashion...

how to schedule ajax calls every N seconds?

If I want a whole page to reload every N seconds, I would put something like this in the HTML: meta http-equiv="refresh" content="5" Is there a standard practice for doing the same kind of thing for AJAX calls? I want schedule an AJAX call to go off every 10 seconds say, in order to update parts of the page, without refreshing the whol...

Round trip HTTP cookie exactly once

Is there a reliable way of round tripping a HTTP cookie value exactly once? e.g. Set-Cookie: name=value; Max-Age=1; ...but Max-Age is in delta seconds not #requests. The reason why I ask is this, http://stackoverflow.com/questions/46582/response-redirect-with-post-instead-of-get/1353717#1353717 ...

Using HTML Parser with HTTPResponse in Python 3.1

The response data from HTTPResponse object is of type bytes. conn = http.client.HTTPConnection(www.yahoo.com) conn.request("GET","/") response = conn.getresponse(); data = response.read() type(data) The data is of type bytes. I would like to use the response along with the built-in HTML parser of Python 3.1. However I find that HTML...

How to determine where a user came from to my site?

I remember having seen somwhere that it is possible to tell where a user came from to a website. More specifically, I want to determine the (Google etc.) search that led to my site. How can I do that? As far as I know the HTTP protocol, nothing like this is sent to the server in a GET request, so I also wonder how it is done technically...