http

Does curl-loader support HTTP 1.0?

Hi, I am writing an automated test program using curl-loader, to send calculated requests to a client. I need to know if curl-loader supports HTTP 1.0, in order to code for a test case. In case it supports it, I'd like to know how to use it. Thanks ...

Programmatically reading a web page

I want to write a program in C/C++ that will dynamically read a web page and extract information from it. As an example imagine if you wanted to write an application to follow and log an ebay auction. Is there an easy way to grab the web page? A library which provides this functionality? And is there an easy way to parse the page to get ...

Does it make a difference in security whether a form POSTs to its own file or a different one?

Assuming I do the same field validation in either case, is there any difference in terms of security whether you POST a form back to its own file or to another? Note that I'm not referring to sensitive information or passwords within the form data, but to whether either method is better at avoiding various types of attacks. ...

Send HTTP request from VC++ file

Hi I am trying to send an HTTP request with the contents of a file set as the body of the HTTP request and want to get the response from a server using VC++. Any help is appreciated. Thanks. I think I was not very clear with what I wanted to do or I misunderstood the answers. Neways, what I want to accomplish is, one of my web-service...

Mocking HTTP Server

Hello, I would like to write tests for my client code, which accesses HTTP Server. I am looking for simple HTTP Server, which would simulate responses from real server. Such HTTP Server (mock server :-)) should verify all requests really came from my client code verify that requests had all required parameters send response, ideally...

Why HTTP protocol is designed in plain text way?

Yesterday, I have a discussion with my colleagues about HTTP. It is asked why HTTP is designed in plain text way. Surely, it can be designed in binary way just like TCP protocol, using flags to represents different kinds of method(POST, GET) and variables (HTTP headers). So, why HTTP is designed in such way? Is there any technical or his...

Physically Separating Secure and Non Secure Web Requests

We have been doing some research into physically isolating the secure and non-secure sections of our web application into two applications. All "http" requests would be served by one server (or cluster) and all "https" requests would be served by another server (or cluster). The reason that we are looking into this is partially for the...

Why are cookie paths case sensitive?

I've realised for the first time a couple of weeks ago that when setting an http cookie, while the domain name is not case sensitive, the path is. So a while a cookie stored for http://SomeWebSite.com can be read using http://somewebsite.com a cookie stored for http://somewebsite.com/SomePath cannot be read using http://somewebs...

Internet Explorer http referer issue

Hello, it seems I have run into a problem with Internet Explorer 7. I have an html page that has links to files on another server. The server I am linking to checks the referrer of the request and if the referrer is valid, it allows access to the resource. It works fine in firefox 2 and 3 (as the server my html page is located on is a v...

What mime type if JSON is being returned by a REST API

My REST API returns JSON. I'm currently returning text/plain as the MIME type but it feels funny. Should I be returning application/x-javascript or some other types ? Second question is with regard to the HTTP status code for error conditions. If my REST API is returning an error state, I am returning as JSON { result: "fail", errorc...

How to intercept HTTP calls from an application?

I want to watch all the HTTP requests going out of a certain application and cancel them if needed. Is there a way to do this in C#? ...

Is it a good Idea to integrate IIS with Tomcat, or forget about it and stick to Apache HTTP with Tomcat

Do you think it is possible to achieve the same performance found in ["Apache Http"-"Tomcat"] with ["IIS"-"Tomcat"] ? Just want to know what you think about the IIS-Tomcat combo (Performance-wise) ...

Easy way to test a URL for 404 in PHP?

I'm teaching myself some basic scraping and I've found that sometimes the URL's that I feed into my code return 404, which gums up all the rest of my code. So I need a test at the top of the code to check if the URL returns 404 or not. This would seem like a pretty straightfoward task, but Google's not giving me any answers. I worry I...

How to produce a 303 Http Response in Django?

Last couple of days we were discussing at another question the best to manage randomness in a RESTful way; today I went to play a little bit with some ideas in Django only to find that there is no easy standard way of returning a 303 response (nor a 300 one, btw), that is, there doesn't seem to exist an HttpResponseSeeOther inside django...

Use HTTP Keep-Alive for server to communicate to client

Recently in an interview I was asked how I would approach an online chat client application. I went through the standard "polling" solution but was cut off because the interviewer was looking for the "HTTP 1.1 keep-alive" method. Having used HTTP for quite a while and remembering that the whole point was to be "stateless", this never o...

Monitoring, simulating, creating HTTP packets

I did some HTTP monitoring with WireShark. Are there more tools like this that allow you to create your own HTTP messsages? Telnet comes to mind Could be handy to get see how hacker-proof your site is... ...

Streaming in C#2.0 IIS 5.1: localhost vs computer name

I am trying to create a webservice that returns streaming data. For that I created a demo webservice, set HttpContext.Current.Response.BufferOutput = false and I am writing to the same repsonse a few jpeg files flushing in between. On the client side I am doing loHttp = (HttpWebRequest)WebRequest.Create(Url); loWebRespons...

How can I read the custom HTTP status code using WCF REST?

I'm using the ChannelFactory in WCF to call into a REST service and I want to determine whether the server returned HTTP 200 or 201 in response to a PUT call. Currently, the call succeeds, but I can't determine if my object was created or updated. How can I do this? ...

What is the maximum length of an url?

Does it differ between browsers? Does the HTTP protocol dictate it? ...

HTTP_REFERER substitute that IE 6 will provide?

So IE (6, at least) won't help me with $_SERVER["HTTP_REFERER"] that I request with PHP. But I'm new to Javascript and have just used a little routine in a pop-up to refresh the page from which the popup was called (i.e. parent). Works beautifully in FireFox, Safari, etc. There's NO security issue - I'd just like to the user loaded ...