http

Weird HTTP problem/mistake with Lisp

I'm attempting to learn a little more about handling sockets and network connections in SBCL; so I wrote a simple wrapper for HTTP. Thus far, it merely makes a stream and performs a request to ultimately get the header data and page content of a website. Until now, it has worked at somewhat decently. Nothing to brag home about, but it a...

What is the purpose of the HTTP header field “Content-Location”?

Confused/inspired by a comment to my question Do search engines respect the HTTP header field “Content-Location”?, I’d like to know, what the exact purpose of the Content-Location header field in HTTP is and how it can be used. ...

Python - downloading a file over HTTP with progress bar and basic authentication

I'm using urllib.urlretrieve to download a file, and implementing a download progress bar using the reporthook parameter. Since urlretrieve doesn't directly support authentication, I came up with import urllib def urlretrieve_with_basic_auth(url, filename=None, reporthook=None, data=None, username="", p...

Can I host two separate web servers on a LAN to the outside world through 1 IP address?

I am a web programmer with a home web dev operation. I have multiple web servers in my house on a FIOS connection. I have my own domain pointed to my router through dyndns.org's custom domain service. My ISP gives me ONE static IP address, which at the moment allows me to configure my router to direct outbound web traffic from one serve...

Can I 'drop' a PHP request without replying?

Hello, I am not completely sure that this is possible from within PHP or even the HTTP protocol in depth. Is it possible to receive PHP script to run when it is requested but then the script drops the connection? Without replying? Hopefully my question makes sense. (I am using Apache) ...

Create simple embedded http and https applications in C#

There is a simple http server API that allow you do some simple stuff quickly, without any addition dependency/installation required. Are there any similar API/library in .NET WITHOUT IIS? For example, I am a small window service running, I'd like to add a simple stupid web interface to allow local/remote control/monitoring. ...

Changing port on which an Axis web service is listening to

I have a web application running on port :80, and I have an Axis web service that is part of that web application. As such, the service is running on port :80 as well. However, for security reasons our client has asked us to change the web service port to 8080 so that they can allow access only to that port for remote consumers of the w...

What is the maximum file size I can transfer using HTTP? And using FTP?

The title says it all. Added: I am conducting a study for a new system we're going to develop in my work. It consists in authenticating users, displaying what files they want to download and downloading them. Also, if the files are not readily available, the user can't download them, but the server obtains a copy of the requested file a...

PHP HTTP POST fails when cURL data > 1024

Note: solution at the end If I attempt to do a HTTP POST of over 1024 characters, it fails. Why? Here is a minimal example: recipient.php: <?php if (strlen(file_get_contents('php://input')) > 1000 || strlen($HTTP_RAW_POST_DATA) > 1000) { echo "This was a triumph."; } ?> sender.php: <?php function try_to_post($char_count) { $u...

Determining which submit button was used?

Is it possible to determine which submit button was used? I have a confirmation form with 2 submit buttons. The first would confirm the order, do some DB tasks, then redirect. The second, which is a Cancel button, will just redirect to the same page, without doing any DB tasks. Is it possible in the servlet, preferably via the reques...

How to execute the "less popular" HTTP actions in a RESTful web app?

I'm developing a Python web app as a learning exercise, and I am looking into making my app RESTful. To that end, I want to be able to handle various types of HTTP actions/verbs where they are applicable. For example, if widget with id 12 is represented with the URI http://domain/widget/12, and I want to give the end user the ability t...

Is there any good example of http upload using WinInet c++ library

I cannot get my code to work :/ ...

What are some other generic http clients available?

In addition to jakarta commons http client, what are some other generic http clients? Can you point to what were your learnings experiences with it? ...

What API to use for adding HTTP client support in an existing MFC app?

I have recently been given a task to add the ability to interact with Web Map Services to an existing MFC application and I am in need of a client-side HTTP API. Based on my research, the leading candidates seem to be CAtlHttpClient and WinHTTP. I was curious to see if anyone had experiences they could share or opinions on which woul...

Is it possible to track every http/url redirects using .NET?

I'm doing a windows forms application and it requires me to log every url redirect that's happening on the user's machine. Like when a user googles something and he clicked on a sponsored link, there will be a number of redirects that'll happen there and i would like to track those redirects. Is there any listener class that I can use t...

What is optimal response size for chuncked transfer in ASP.NET?

I am creating a reverse proxy and I am trying to find the optimal buffer for a response size for a chuncked transfer-encoding. Currently I have it set at 4 kb. Is this number OK, or is there a better size that I should be using. I would like this backed up with some tests if at all possible. I would also accept a property setting som...

How to modify the header of a HttpUrlConnection

Im trying to improve the Java Html Document a little but i'm running into problems with the HttpUrlConntion. One thing is that some servers block a request if the user agent is a Java VM. Another problem is that the HttpUrlConnection does not set the Referrer or Location header field. Since several sites use these fields to verify that t...

Different performance between Java and c# code when testing URL

When running the following Java code, I get very accurate and consistent results in determining if the web page I'm testing is up. protected synchronized boolean checkUrl(HttpURLConnection connection){ boolean error = false; //HttpURLConnection connection = null; GregorianCalendar calendar = new GregorianCalendar(); try{ if(conne...

Error Code: 502 Proxy Error. The ISA Server denied the specified Uniform Resource Locator (URL). (12202)

I am getting above error in some machines but not in some machines while accessing the documents. ...

Java http download corrupts file

Hello all! I have a problem, which I do not seem to be able to solve... I do a http download of a file, but the CRC32 of the file on the server and on the client do not match. Also, the file has different size, so obviously I must be doing something wrong... when I download via Firefox, the filesize is ok... so I guess it is somewhere i...