google-code-export / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

URLs containing special characters raise errors #467

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In my sitemap I have some image widgets to show RRD graphs generated on an 
other server, e.g.:

Image 
url="http://server.domain.internal/graph.pl?--start=-24h;--end=now;-X=0;-W=WireG
ate;--slope-mode;-h=400;-w=640;--full-size-mode;--vertical-label=%B0%20Celsius;-
-title=Technikraum;-c=BACK%23F0F0F0;-c=CANVAS%23FFFFFF;-c=SHADEA%23D0D0D0;-c=SHA
DEB%23D0D0D0;-c=GRID%23E8E8E8;-c=MGRID%23EEA5A5;-c=FONT%23000000;-c=AXIS%2300000
0;-c=FRAME%23000000;-c=ARROW%23000000;DEF:ds0=26.1B1C3F000000_hum.rrd:value:AVER
AGE;CDEF:ds0_scale=ds0,0.25,*;LINE1:ds0_scale%230000FF:Feuchte%20%20%20;VDEF:ds0
_LAST=ds0,LAST;GPRINT:ds0_LAST:%8.1lf%20%%%20;VDEF:ds0_MIN=ds0,MINIMUM;GPRINT:ds
0_MIN:Min%5C:%8.1lf%20%%%20;VDEF:ds0_AVERAGE=ds0,AVERAGE;GPRINT:ds0_AVERAGE:Mitt
el%5C:%8.1lf%20%%%20;VDEF:ds0_MAX=ds0,MAXIMUM;GPRINT:ds0_MAX:Max%5C:%8.1lf%20%%%
20%5Cn;TEXTALIGN:right;DEF:ds1=26.1B1C3F000000_temp.rrd:value:AVERAGE;LINE1:ds1%
2300FF00:Temp.%20(MS);VDEF:ds1_LAST=ds1,LAST;GPRINT:ds1_LAST:%8.1lf%20%B0C;VDEF:
ds1_MIN=ds1,MINIMUM;GPRINT:ds1_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds1_AVERAGE=ds1,AVE
RAGE;GPRINT:ds1_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds1_MAX=ds1,MAXIMUM;GPRINT:
ds1_MAX:Max%5C:%8.1lf%20%B0C%5Cn;DEF:ds2=28.E14572020000_temp.rrd:value:AVERAGE;
LINE1:ds2%23FF0000:Temperatur;VDEF:ds2_LAST=ds2,LAST;GPRINT:ds2_LAST:%8.1lf%20%B
0C;VDEF:ds2_MIN=ds2,MINIMUM;GPRINT:ds2_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds2_AVERAGE
=ds2,AVERAGE;GPRINT:ds2_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds2_MAX=ds2,MAXIMUM
;GPRINT:ds2_MAX:Max%5C:%8.1lf%20%B0C%5Cn;" refresh=300000

Viewing these images in the Classic UI shows only a placeholder for the image. 
Right clicking on the image, copying the address and entering it in the browser 
reveals the following error:

HTTP ERROR 500

Problem accessing /proxy. Reason:

    URI 'http://wiregate.domain.internal/graph.pl?--start=-24h;--end=now;-X=0;-W=WireGate;--slope-mode;-h=400;-w=640;--full-size-mode;--vertical-label=%B0%20Celsius;--title=Technikraum;-c=BACK%23F0F0F0;-c=CANVAS%23FFFFFF;-c=SHADEA%23D0D0D0;-c=SHADEB%23D0D0D0;-c=GRID%23E8E8E8;-c=MGRID%23EEA5A5;-c=FONT%23000000;-c=AXIS%23000000;-c=FRAME%23000000;-c=ARROW%23000000;DEF:ds0=26.1B1C3F000000_hum.rrd:value:AVERAGE;CDEF:ds0_scale=ds0,0.25,*;LINE1:ds0_scale%230000FF:Feuchte%20%20%20;VDEF:ds0_LAST=ds0,LAST;GPRINT:ds0_LAST:%8.1lf%20%%%20;VDEF:ds0_MIN=ds0,MINIMUM;GPRINT:ds0_MIN:Min%5C:%8.1lf%20%%%20;VDEF:ds0_AVERAGE=ds0,AVERAGE;GPRINT:ds0_AVERAGE:Mittel%5C:%8.1lf%20%%%20;VDEF:ds0_MAX=ds0,MAXIMUM;GPRINT:ds0_MAX:Max%5C:%8.1lf%20%%%20%5Cn;TEXTALIGN:right;DEF:ds1=26.1B1C3F000000_temp.rrd:value:AVERAGE;LINE1:ds1%2300FF00:Temp.%20(MS);VDEF:ds1_LAST=ds1,LAST;GPRINT:ds1_LAST:%8.1lf%20%B0C;VDEF:ds1_MIN=ds1,MINIMUM;GPRINT:ds1_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds1_AVERAGE=ds1,AVERAGE;GPRINT:ds1_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds1_MAX=ds1,MAXIMUM;GPRINT:ds1_MAX:Max%5C:%8.1lf%20%B0C%5Cn;DEF:ds2=28.E14572020000_temp.rrd:value:AVERAGE;LINE1:ds2%23FF0000:Temperatur;VDEF:ds2_LAST=ds2,LAST;GPRINT:ds2_LAST:%8.1lf%20%B0C;VDEF:ds2_MIN=ds2,MINIMUM;GPRINT:ds2_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds2_AVERAGE=ds2,AVERAGE;GPRINT:ds2_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds2_MAX=ds2,MAXIMUM;GPRINT:ds2_MAX:Max%5C:%8.1lf%20%B0C%5Cn;' is not valid: Malformed escape pair at index 508: http://wiregate.domain.internal/graph.pl?--start=-24h;--end=now;-X=0;-W=WireGate;--slope-mode;-h=400;-w=640;--full-size-mode;--vertical-label=%B0%20Celsius;--title=Technikraum;-c=BACK%23F0F0F0;-c=CANVAS%23FFFFFF;-c=SHADEA%23D0D0D0;-c=SHADEB%23D0D0D0;-c=GRID%23E8E8E8;-c=MGRID%23EEA5A5;-c=FONT%23000000;-c=AXIS%23000000;-c=FRAME%23000000;-c=ARROW%23000000;DEF:ds0=26.1B1C3F000000_hum.rrd:value:AVERAGE;CDEF:ds0_scale=ds0,0.25,*;LINE1:ds0_scale%230000FF:Feuchte%20%20%20;VDEF:ds0_LAST=ds0,LAST;GPRINT:ds0_LAST:%8.1lf%20%%%20;VDEF:ds0_MIN=ds0,MINIMUM;GPRINT:ds0_MIN:Min%5C:%8.1lf%20%%%20;VDEF:ds0_AVERAGE=ds0,AVERAGE;GPRINT:ds0_AVERAGE:Mittel%5C:%8.1lf%20%%%20;VDEF:ds0_MAX=ds0,MAXIMUM;GPRINT:ds0_MAX:Max%5C:%8.1lf%20%%%20%5Cn;TEXTALIGN:right;DEF:ds1=26.1B1C3F000000_temp.rrd:value:AVERAGE;LINE1:ds1%2300FF00:Temp.%20(MS);VDEF:ds1_LAST=ds1,LAST;GPRINT:ds1_LAST:%8.1lf%20%B0C;VDEF:ds1_MIN=ds1,MINIMUM;GPRINT:ds1_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds1_AVERAGE=ds1,AVERAGE;GPRINT:ds1_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds1_MAX=ds1,MAXIMUM;GPRINT:ds1_MAX:Max%5C:%8.1lf%20%B0C%5Cn;DEF:ds2=28.E14572020000_temp.rrd:value:AVERAGE;LINE1:ds2%23FF0000:Temperatur;VDEF:ds2_LAST=ds2,LAST;GPRINT:ds2_LAST:%8.1lf%20%B0C;VDEF:ds2_MIN=ds2,MINIMUM;GPRINT:ds2_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds2_AVERAGE=ds2,AVERAGE;GPRINT:ds2_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds2_MAX=ds2,MAXIMUM;GPRINT:ds2_MAX:Max%5C:%8.1lf%20%B0C%5Cn;
Caused by:

javax.servlet.ServletException: URI 
'http://wiregate.domain.internal/graph.pl?--start=-24h;--end=now;-X=0;-W=WireGat
e;--slope-mode;-h=400;-w=640;--full-size-mode;--vertical-label=%B0%20Celsius;--t
itle=Technikraum;-c=BACK%23F0F0F0;-c=CANVAS%23FFFFFF;-c=SHADEA%23D0D0D0;-c=SHADE
B%23D0D0D0;-c=GRID%23E8E8E8;-c=MGRID%23EEA5A5;-c=FONT%23000000;-c=AXIS%23000000;
-c=FRAME%23000000;-c=ARROW%23000000;DEF:ds0=26.1B1C3F000000_hum.rrd:value:AVERAG
E;CDEF:ds0_scale=ds0,0.25,*;LINE1:ds0_scale%230000FF:Feuchte%20%20%20;VDEF:ds0_L
AST=ds0,LAST;GPRINT:ds0_LAST:%8.1lf%20%%%20;VDEF:ds0_MIN=ds0,MINIMUM;GPRINT:ds0_
MIN:Min%5C:%8.1lf%20%%%20;VDEF:ds0_AVERAGE=ds0,AVERAGE;GPRINT:ds0_AVERAGE:Mittel
%5C:%8.1lf%20%%%20;VDEF:ds0_MAX=ds0,MAXIMUM;GPRINT:ds0_MAX:Max%5C:%8.1lf%20%%%20
%5Cn;TEXTALIGN:right;DEF:ds1=26.1B1C3F000000_temp.rrd:value:AVERAGE;LINE1:ds1%23
00FF00:Temp.%20(MS);VDEF:ds1_LAST=ds1,LAST;GPRINT:ds1_LAST:%8.1lf%20%B0C;VDEF:ds
1_MIN=ds1,MINIMUM;GPRINT:ds1_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds1_AVERAGE=ds1,AVERA
GE;GPRINT:ds1_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds1_MAX=ds1,MAXIMUM;GPRINT:ds
1_MAX:Max%5C:%8.1lf%20%B0C%5Cn;DEF:ds2=28.E14572020000_temp.rrd:value:AVERAGE;LI
NE1:ds2%23FF0000:Temperatur;VDEF:ds2_LAST=ds2,LAST;GPRINT:ds2_LAST:%8.1lf%20%B0C
;VDEF:ds2_MIN=ds2,MINIMUM;GPRINT:ds2_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds2_AVERAGE=d
s2,AVERAGE;GPRINT:ds2_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds2_MAX=ds2,MAXIMUM;G
PRINT:ds2_MAX:Max%5C:%8.1lf%20%B0C%5Cn;' is not valid: Malformed escape pair at 
index 508: 
http://wiregate.domain.internal/graph.pl?--start=-24h;--end=now;-X=0;-W=WireGate
;--slope-mode;-h=400;-w=640;--full-size-mode;--vertical-label=%B0%20Celsius;--ti
tle=Technikraum;-c=BACK%23F0F0F0;-c=CANVAS%23FFFFFF;-c=SHADEA%23D0D0D0;-c=SHADEB
%23D0D0D0;-c=GRID%23E8E8E8;-c=MGRID%23EEA5A5;-c=FONT%23000000;-c=AXIS%23000000;-
c=FRAME%23000000;-c=ARROW%23000000;DEF:ds0=26.1B1C3F000000_hum.rrd:value:AVERAGE
;CDEF:ds0_scale=ds0,0.25,*;LINE1:ds0_scale%230000FF:Feuchte%20%20%20;VDEF:ds0_LA
ST=ds0,LAST;GPRINT:ds0_LAST:%8.1lf%20%%%20;VDEF:ds0_MIN=ds0,MINIMUM;GPRINT:ds0_M
IN:Min%5C:%8.1lf%20%%%20;VDEF:ds0_AVERAGE=ds0,AVERAGE;GPRINT:ds0_AVERAGE:Mittel%
5C:%8.1lf%20%%%20;VDEF:ds0_MAX=ds0,MAXIMUM;GPRINT:ds0_MAX:Max%5C:%8.1lf%20%%%20%
5Cn;TEXTALIGN:right;DEF:ds1=26.1B1C3F000000_temp.rrd:value:AVERAGE;LINE1:ds1%230
0FF00:Temp.%20(MS);VDEF:ds1_LAST=ds1,LAST;GPRINT:ds1_LAST:%8.1lf%20%B0C;VDEF:ds1
_MIN=ds1,MINIMUM;GPRINT:ds1_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds1_AVERAGE=ds1,AVERAG
E;GPRINT:ds1_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds1_MAX=ds1,MAXIMUM;GPRINT:ds1
_MAX:Max%5C:%8.1lf%20%B0C%5Cn;DEF:ds2=28.E14572020000_temp.rrd:value:AVERAGE;LIN
E1:ds2%23FF0000:Temperatur;VDEF:ds2_LAST=ds2,LAST;GPRINT:ds2_LAST:%8.1lf%20%B0C;
VDEF:ds2_MIN=ds2,MINIMUM;GPRINT:ds2_MIN:Min%5C:%8.1lf%20%B0C;VDEF:ds2_AVERAGE=ds
2,AVERAGE;GPRINT:ds2_AVERAGE:Mittel%5C:%8.1lf%20%B0C;VDEF:ds2_MAX=ds2,MAXIMUM;GP
RINT:ds2_MAX:Max%5C:%8.1lf%20%B0C%5Cn;
    at org.openhab.ui.internal.proxy.ProxyServlet.doGet(ProxyServlet.java:167)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.eclipse.jetty.server.Server.handle(Server.java:350)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
    at java.lang.Thread.run(Thread.java:724)

After replacing all ":" with %3A and all %8.1 with %258.1 in the URL everything 
works as expected. The problem occurs since upgrading to the 1.3 release 
version.

Original issue reported on code.google.com by estan...@gmx.de on 19 Sep 2013 at 5:56

GoogleCodeExporter commented 9 years ago

Original comment by teichsta on 5 Nov 2013 at 10:53

GoogleCodeExporter commented 9 years ago
This issue has been migrated to Github. If this issue id is greater than103 its 
id has been preserved on Github. You can open your issue by calling the URL 
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or 
equal 103 new ids were created.

Original comment by teichsta on 17 Nov 2013 at 8:08

GoogleCodeExporter commented 9 years ago
Set status to "invalid" to show that these issues are not tracked here anymore 
- please refer to GitHub instead!

Original comment by kai.openhab on 2 Dec 2013 at 7:12