You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by "Raido Kuli (JIRA)" <ji...@apache.org> on 2010/02/17 11:49:28 UTC
[jira] Issue Comment Edited: (WOOKIE-118) GET and POST request
broken (jQuery + Widget.proxify)
[ https://issues.apache.org/jira/browse/WOOKIE-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834727#action_12834727 ]
Raido Kuli edited comment on WOOKIE-118 at 2/17/10 10:48 AM:
-------------------------------------------------------------
jQuery.get();
[java] 12:40:41,514 ERROR log:? - /wookie/proxy
[java] java.lang.IllegalArgumentException: Invalid uri 'http://htk-ordi:808
2/demo_xml/response.php&responseXml=<?xml version="1.0" encoding="UTF-8"?>
[java] <widgetResponse>
[java] <response Identifier="RESPONSE_3" value="G"></response>
[java] </widgetResponse>': escaped absolute path not valid
Still missing "?" after response.php.
jQuery.post();
Works with querystring -> http://urltopost.com/response.php?hello=world
Does not work with parameters.
Edit: Now manual "?" fix is also broken ->
[java] 12:47:44,245 WARN log:? - /wookie/proxy
[java] java.lang.Exception: Method failed: HTTP/1.1 400 Bad Request http://
htk-ordi:8082/demo_xml/response.php?&responseXml=<?xml version="1.0" encoding="U
TF-8"?>
[java] <widgetResponse>
[java] <response Identifier="RESPONSE_3" value="G"></response>
[java] </widgetResponse> Bad Request<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTM
L 2.0//EN">
[java] <html><head>
[java] <title>400 Bad Request</title>
[java] </head><body>
[java] <h1>Bad Request</h1>
[java] <p>Your browser sent a request that this server could not understand
.<br />
[java] Request header field is missing ':' separator.<br />
[java] <pre>
[java] <widgetResponse></pre>
[java] </p>
[java] </body></html>
was (Author: raido357):
jQuery.get();
[java] 12:40:41,514 ERROR log:? - /wookie/proxy
[java] java.lang.IllegalArgumentException: Invalid uri 'http://htk-ordi:808
2/demo_xml/response.php&responseXml=<?xml version="1.0" encoding="UTF-8"?>
[java] <widgetResponse>
[java] <response Identifier="RESPONSE_3" value="G"></response>
[java] </widgetResponse>': escaped absolute path not valid
Still missing "?" after response.php.
jQuery.post();
Works with querystring -> http://urltopost.com/response.php?hello=world
Does not work with parameters.
> GET and POST request broken (jQuery + Widget.proxify)
> -----------------------------------------------------
>
> Key: WOOKIE-118
> URL: https://issues.apache.org/jira/browse/WOOKIE-118
> Project: Wookie
> Issue Type: Bug
> Components: Server
> Reporter: Raido Kuli
>
> [java] java.lang.Exception: Method failed: HTTP/1.1 404 Not Found http://ht
> k-ordi:8082/demo_xml/response.php&responseXml=%3C%3Fxml+version%3D%221.0%22+enco
> ding%3D%22UTF-8%22%3F%3E%0D%0A%3CwidgetResponse%3E%0D%0A%3Cresponse+Identifier%3
> D%22RESPONSE_3%22+value%3D%22G%22%3E%3C%2Fresponse%3E%0D%0A%3C%2FwidgetResponse%
> 3E Not Found<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> [java] <html><head>
> [java] <title>404 Not Found</title>
> [java] </head><body>
> [java] <h1>Not Found</h1>
> [java] <p>The requested URL /demo_xml/response.php&responseXml=<?xml
> +version="1.0"+encoding="UTF-8"?>
> [java] <widgetResponse>
> [java] <response+Identifier="RESPONSE_3"+value="G"&g
> t;</response>
> [java] </widgetResponse> was not found on this server.</p>
> [java] </body></html>
> [java]
> [java] at org.apache.wookie.proxy.ProxyClient.executeMethod(ProxyClient
> .java:149)
> [java] at org.apache.wookie.proxy.ProxyClient.fetchData(ProxyClient.jav
> a:169)
> [java] at org.apache.wookie.proxy.ProxyClient.get(ProxyClient.java:85)
> [java] at org.apache.wookie.proxy.ProxyServlet.dealWithRequest(ProxySer
> vlet.java:100)
> [java] at org.apache.wookie.proxy.ProxyServlet.doGet(ProxyServlet.java:
> 61)
> [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> [java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.
> java:487)
> [java] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1098)
> [java] at org.apache.wookie.server.CharSetFilter.doFilter(CharSetFilter
> .java:34)
> This happens if i trie run jQuery.get() ->
> var loc = Widget.proxify('http://mywidget.get.url/response.php');
> jQuery.get(
> loc, { responseXml : respXml },
> handleResponse
> );
> This code above brokes the proxy. I've also found a fix for this, you need to add "?" in the end of URL manually. So the code would look like ->
> var loc = Widget.proxify('http://htk-ordi:8082/demo_xml/response.php?');
> jQuery.get(
> loc, { responseXml : respXml },
> handleResponse
> );
> This way the GET request starts to work.
> Now for the POST request, I am in wookie-dev list and got some emails, that "POST is now forwarded through proxy", but with jQuery it does not.
> var loc = Widget.proxify('http://htk-ordi:8082/demo_xml/response.php');
> jQuery.post(
> loc, { responseXml : respXml },
> handleResponse
> );
> PHP script returns empty $_POST.
> Maybe I am doing something wrong ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.