Skip to content

Instantly share code, notes, and snippets.

@bartvde
Created February 2, 2012 09:40
Show Gist options
  • Save bartvde/1722615 to your computer and use it in GitHub Desktop.
Save bartvde/1722615 to your computer and use it in GitHub Desktop.
curl fail
curl --data '<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" service="CSW" version="2.0.2" resultType="results" maxRecords="100" xmlns:gmd="http://www.isotc211.org/2005/gmd"><csw:Query typeNames="gmd:MD_Metadata"><csw:ElementSetName>full</csw:ElementSetName></csw:Query></csw:GetRecords>' "http://localhost:8080/proxy/?url=http%3A%2F%2Fdemo.geonode.org%2Fgeonetwork%2Fsrv%2Fen%2Fcsw%3FresultType%3Dresults%26maxRecords%3D100%26Query%3D%255Bobject%2520Object%255D" --verbose --header "Content-type: application/xml; charset=UTF-8"
@bartvde
Copy link
Author

bartvde commented Feb 2, 2012

  • About to connect() to localhost port 8080 (#0)
  • Trying ::1... connected
  • Connected to localhost (::1) port 8080 (#0)

    POST /proxy/?url=http%3A%2F%2Fdemo.geonode.org%2Fgeonetwork%2Fsrv%2Fen%2Fcsw%3FresultType%3Dresults%26maxRecords%3D100%26Query%3D%255Bobject%2520Object%255D HTTP/1.1
    User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
    Host: localhost:8080
    Accept: /
    Content-type: application/xml; charset=UTF-8
    Content-Length: 291

    < HTTP/1.1 400 Bad Request
    < Date: Thu, 02 Feb 2012 09:39:00 GMT
    < Date: Thu, 02 Feb 2012 09:39:01 GMT
    < Server: Apache-Coyote/1.1
    < Content-Type: text/html;charset=utf-8
    < Content-Length: 1328
    < Via: 1.1 demo.geonode.org
    < Vary: Accept-Encoding
    < Connection: close
    < <title>Apache Tomcat/6.0.24 - Error report</title><style></style>

    HTTP Status 400 - Cannot build ServiceRequest Cause : Error on line -1: Premature end of file. Error : org.jdom.input.JDOMParseException


    type Status report

    message Cannot build ServiceRequest Cause : Error on line -1: Premature end of file. Error : org.jdom.input.JDOMParseException

    description The request sent by the client was syntactically incorrect (Cannot build ServiceRequest Cause : Error on line -1: Premature end of file. Error : org.jdom.input.JDOMParseException

  • Closing connection #0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment