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:13:27 UTC

[jira] Updated: (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:all-tabpanel ]

Raido Kuli updated WOOKIE-118:
------------------------------

    Comment: was deleted

(was: Yes I do.)

> 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&amp;responseXml=&lt;?xml
> +version=&quot;1.0&quot;+encoding=&quot;UTF-8&quot;?&gt;
>      [java] &lt;widgetResponse&gt;
>      [java] &lt;response+Identifier=&quot;RESPONSE_3&quot;+value=&quot;G&quot;&g
> t;&lt;/response&gt;
>      [java] &lt;/widgetResponse&gt; 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.