cURL / Mailing Lists / curl-users / Single Mail


Re: curl_easy_perform blocks when trying to read a response Header

From: Michael Ludwig <>
Date: Thu, 06 Nov 2008 15:25:11 +0100

Ambarish Mitra schrieb:
> I am trying to get the HTTP response from a simple servlet. The
> trouble is: the program blocks at curl_easy_perform, and does not come
> out of it even if the servlet has completed.
> I have a running test Java servlet (deployed on Tomcat), which returns
> a response code of 200.

It is certainly running, but maybe not in the direction you want.

> protected void doGet(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException
> {
> System.out.println("doget - start ");

The problem is that you're printing to the standard output, but the
Servlet API doesn't work that way. Take a look at the documentation here
to find out how you're supposed to use this API.

If you wonder where your output goes, take a look at the server's log

This doesn't have anything to do with curl.

I hope this helps.

Michael Ludwig
List admin:
Received on 2008-11-06