http

Eclipse dynamic web project - MappingNotFoundException

I have a Eclipse Dynamic Web Project which host a simple servlet and runs on Tomcat. I use Hibernate within - I have classes that map to database tables and hbm.xml files for them within my project. Everything works fine - I can use Hibernate from Servlet and modify database tables through classes. But now I want to move my "model" (Java...

Using Http Pipelining for Rest on IIS

Given a workflow that I support, there is a high chance that there would be at least a hundred consecutive calls to the same resource done in rapid succession. I started looking into batching calls for Rest and ran into people suggesting Http Pipelining as the solution. My understanding is that the client will be able to make dozens of r...

Retrieving Data

I need to do an HTTP call to this page for every bike (one) and wheels seq (many) combination in the database: http://web_address/index.cfm?fuseaction=bike=444444&wheels_seq=1111 and get the form values from the database. After this, submit this form programmatically with the form values by firing the Send button on the page. W...

REST interface usage for multiple resources

I am currently adding a REST API over http to an online service and I am confronted with a very simple problem for which I cannot find an answer that satisfies me: I have mainly 2 resources: 'user' and 'reports', as you would have guessed reports are associated to users (to one and only one, = foreign key in my db) Anyway I have this u...

Modifying html repsonse from a webserver before it reaches the browser using a webserver plugin?

The question is as simple as the title. I have a webapp (I have no clue as to what technology it was built on or what appserver it is running on). However, I do know that this webapp is being served by an Apache Server/ IIS Server / IBM Http Server. Now, I would like to have a plugin/ module / add-on at the web-server end, which would pa...

How to test for "If-Modified-Since" HTTP Header support

Using PHP how can I accurately test that a remote website supports the "If-Modified-Since" HTTP header. From what I have read, if the remote file you GET has been modified since the date specified in the header request - it should return a 200 OK status. If it hasn't been modified, it should return a 304 Not Modified. Therefore my q...

REST - Modify Part of Resource - PUT or POST

I'm seeing a good bit of hand-waving on the subject of how to update only part of a resource (eg. status indicator) using REST. The options seem to be: Complain that HTTP doesn't have a PATCH or MODIFY command. However, the accepted answer on http://stackoverflow.com/questions/1672025/http-modify-verb-for-rest does a good job of show...

Parsing HTTP_RANGE header in PHP

Is there an existing way to parse the HTTP_RANGE header correctly in PHP? Thought I'd ask here before re-inventing the wheel. I am currently using preg_match('/bytes=(\d+)-(\d+)/', $_SERVER['HTTP_RANGE'], $matches); to parse the header but that does not cover all possible values of the header so I am wondering if there is a function ...

How to stop streamed Comet communications being buffered in the browser

I'm trying to push packets of data from my HTTP server to a browser, using a Comet "forever iframe" and feeding it script tags from the server using the Transfer-Encoding: chunked header. What I'm finding is that my script tags aren't being interpreted right away, and I have to send a number of chunks before the browser starts to respon...

http proxy javascript injection

I have a simple proxy source in C++. I'm trying to modify it to inject some html content into specific pages. I'v managed to get it working but whenever I inject something, part of the original html gets corrupted. I know for a fact that it's not my string handling functions because I have it printing out the result before sending and it...

Is there a way to allow Google App Engine to send body or payload with a DELETE request?

I'm attempting to interface with an API that requires XML data to be contained in the body of an HTTP DELETE request. I'm using urlfetch in AppEngine and the payload is simply ignored for DELETE requests. After reading this article: http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request, I realiz...

Using a QNetworkAccessManager.get, how can I decide to abort?

I am attempting to use the QT QNetworkAccessManager class to manage some downloads in a multi-threaded C++/QT application. On worker thread (edit: the thread is seperate for other reasons aside from doing the download), I'm would like to do a get to an external server and be ready to receive the results with the code: ... m_nam = new ...

How can I create a HTTP POST request with Qt 4.6.1?

How can I create a HTTP POST request with some URL encoded parameters using Qt 4.6.1? I figured out that I can create a QNetworkRequest, set all the parameters there and send it via QNetworkAccessManagers post method. But how can I add some URL-encoded parameters to the request? In the end I want to access the Eve API using Qt/C++. A P...

Is it possible to fire an onclick event in an url or query string?

I have a web page with a off-site links whose onclick events are handled by jQuery. The jQuery fetches the content of the page the link points to and inserts it into a div. What I would like to do is be able to give somebody an url for this page that would cause the onclick event for one of the links to fire, thus loading the div with t...

How to evaluate http response codes from bash/shell script?

I have the feeling that I'm missing the obvious, but have not succeeded with man [curl|wget] or google ("http" makes such a bad search term). I'm looking for a quick&dirty fix to one of our webservers that frequently fails, returning status code 500 with an error message. Once this happens, it needs to be restarted. As the root cause se...

Sample code for POST + cookie?

Hello, I've been googling for some VB.Net code to authenticate to a web server with the POST method, receive a session ID in a cookie, and then send this cookie along with all GET queries... but all I found is half-working code or C# code, ie. difficult to use for a VB.Net newbie. Would someone have some code handy or some pointer that...

Good lightweight library for HTTP POST/GET for C?

Hi, I'm planning of creating a Last.FM scrobbler plugin for a music player in Windows. Last.FM submissions API relays on HTTP/1.1 GET and POST. I've never done Internet oriented programming and I've still to know about the HTTP protocol but I'd like to start playing around with it sending and getting some data. I've looked at the Winsoc...

HttpServletRequest to complete URL

I have an HttpServletRequest object. How do I get the complete and exact URL that cause this call to arrive at my servlet? Or at least as accurately as possible, as there are perhaps things that can be regenerated (the order of the parameters, perhaps). ...

ASP HttpWebRequest and Redirect

OK, I have a client doing a POST to a server with some data. The server receives the post, and answers with a redirect. The problem is that the client does not redirects. Also, I've tried to check the StatusCode of the response the client gets, and it is always the same "OK". Instead of the redirect code. What am I missing? In the clien...

Understanding REST: REST as a high volume transport?

I'm designing a system that will need to move multi-GB backup images over TCP, and I'm looking at REST as an alternative to ONC RPC. For example, I might have POST http://site/backups/image1 where image1 is an 50GB file whose data is contained in the HTTP body. My question: is this within the scope of what REST is meant for? Is it ...