[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Curl return codes

I found a solution:

Now I run curl -D curl-header -o reference.maps http://proxy.chtc.wisc.edu/SQUID/LMCG/nwp/reference185.maps
grep -q 'HTTP/1\..\+ 200 OK' curl-header || exit 1

Is there any better way of doing this?

On Thu, Jan 31, 2013 at 08:16:07PM -0600, Nathan Panike wrote:
> Any curl experts in htcondor-users?
> I have the following:
> + curl -o reference.maps http://proxy.chtc.wisc.edu/SQUID/LMCG/nwp/reference185.maps
> ^^^ This returns success, and yet:
> + /usr/bin/head reference.maps
> "http://www.w3.org/TR/html4/strict.dtd";>
> <html><head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
> <title>ERROR: The requested URL could not be retrieved</title>
> <style type="text/css"><!--
>  /*
>  Stylesheet for Squid Error pages
>  Adapted from design by Free CSS Templates
>  http://www.freecsstemplates.org
>  Released for free under a Creative Commons Attribution 2.5 License
> Now, I can run "curl -o reference.maps http://proxy.chtc.wisc.edu/SQUID/LMCG/nwp/reference185.maps";
> and get the correct file, but it is failing on some execute node.
> What is the correct command line option to curl to correctly diagnose
> that the "requested URL could not be retrieved"?

Nathan Panike