http:get-text() return value
Bug #1039990 reported by
Xiang Gao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
New
|
Low
|
Federico Cavalieri |
Bug Description
when I called http:get-
Changed in zorba: | |
importance: | Undecided → Low |
Changed in zorba: | |
assignee: | nobody → Paul J. Lucas (paul-lucas) |
Changed in zorba: | |
assignee: | Paul J. Lucas (paul-lucas) → Federico Cavalieri (fcavalieri) |
To post a comment you must log in.
Tested with both the old and new http module. zorba.io/ modules/ http-client"; www.zorba- xquery. com/modules/ http-client"; text("http:// 127.0.0. 1:8080/ default/ cities. txt"), 127.0.0. 1:8080/ default/ cities. txt")
import module namespace http2 = "http://
import module namespace http = "http://
http:get-
http2:get-text("http://
On my machine they return the correct answer:
<response xmlns="http:// expath. org/ns/ http-client" status="404" message="Not Found"><header name="Date" value="Fri, 21 Jun 2013 04:03:00 GMT"/><header name="Server" value=" Apache/ 2.2.22 (Ubuntu)"/><header name="Vary" value=" Accept- Encoding" /><header name="Content- Length" value=" 293"/>< header name="Content-Type" value="text/html; charset= iso-8859- 1"/><body media-type= "text/html" /></response> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> gt;< head> gt;< body> gt;Apache/ 2.2.22 (Ubuntu) Server at 127.0.0.1 Port 8080< /address& gt; gt;< /html> , ">\n<html> <head>\ n<title> 404 Not Found</ title>\ n</head> <body>\ n<h1>Not Found</h1>\n<p>The requested URL /default/cities.txt was not found on this server. </p>\n< hr>\n<address> Apache/ 2.2.22 (Ubuntu) Server at 127.0.0.1 Port 8080</address> \n</body> </html> \n" }, "headers" : { "Content-Length" : "293", "Content-Type" : "text/html; charset= iso-8859- 1", "Date" : "Fri, 21 Jun 2013 04:00:51 GMT", "Server" : "Apache/2.2.22 (Ubuntu)", "Vary" : "Accept-Encoding" } }
<html&
<title>404 Not Found</title>
</head&
<h1>Not Found</h1>
<p>The requested URL /default/cities.txt was not found on this server.</p>
<hr>
<address&
</body&
{ "status" : 404, "message" : "Not Found", "body" : { "media-type" : "text/html", "content" : "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\