| Summary: | ArrayIndexOutOfboundsException in ProxyServlet | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Tim Roberts <troberts> |
| Component: | Compendium | Assignee: | equinox.components-inbox <equinox.components-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | raymond.auge, tjwatson |
| Version: | unspecified | ||
| Target Milestone: | 4.11 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| See Also: |
https://git.eclipse.org/r/133892 https://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=06745b4298f5ad9dce5d680095cb8fea435587cd |
||
| Whiteboard: | |||
|
Description
Tim Roberts
Might be related to changes from https://bugs.eclipse.org/497510 Ray, org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.getNotDecodedAlias(HttpServletRequest) keeps getting more tricks thrown at it. What now? We have to first decode the slashes before doing this? Just pinging as this is a show stopper for us... Just pinging again as there has been no replies. If someone wants me to tackle this myself, I can - but I have no idea what the original issue that caused this code change was and wouldn't feel real comfortable doing a change based on that. I want Ray to weigh in on this one. I'm a bit concerned about what is being used as the path in this case: /neeo/NEEO-a5056097%2Fdevice%2Fapt-neeo_io%3Avirtual%3A6jzOoAtL%2FTemperature_GF_Living%2Fnone%2F1%2Fdirectory%2Factor/default Because we have a mix between encoded '/' and non-encoded '/'. I'm not sure if the spec allows such a thing. Ray do you have some time you could spend looking at this? I agree - unfortunately this is a hardware device formatting/sending this URL and I have no control over it and it was working fine prior to this change. I can give you insight into the the confusion (not saying whether the hardware designers are correct or not in their approach - just stating the approach). The non-encoded slashes denote the actual path: First segment: the source device Second segment: the source component Third segment: the source value So if we look at the URL: I know the source device is "NEEO", the source component on the device is "NEEO-a5...actor" and the source value for the component is "default" The problem is that the device name will include slashes itself and those should be considered part of the segment - not as a segment delimiter. So you get non-encoded slashes to denote the segments and then encoded slashes to denote the data within the segment. I will add that after saying all that - if you want to treat the encoded slashes as a segment delimiter, I'd have no problems with that either. We just really need to fix the AIOOB exception from occurring.. I'm investigating... The first thing I can add is that, given this request: /NEEO-a5056097%2Fdevice%2Fapt-neeo_io%3Avirtual%3A6jzOoAtL%2FTemperature_GF_Living%2Fnone%2F1%2Fdirectory%2Factor/default Jetty's own request.getPathInfo() method returns this: /NEEO-a5056097/device/apt-neeo_io:virtual:6jzOoAtL/Temperature_GF_Living/none/1/directory/actor/default following that, the existing logic to get a compute the non-decoded pathinfo is pretty borked (i.e. is pretty broken). New Gerrit change created: https://git.eclipse.org/r/133892 @Tim would you be able to check the fix in the gerrit? I've added a test based on the path you provided and everything works. I hope this is the end of the silly path encoding issues. Gerrit change https://git.eclipse.org/r/133892 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=06745b4298f5ad9dce5d680095cb8fea435587cd @Tim if would be please try with the subsequent i-build? (In reply to Raymond Auge from comment #13) > @Tim if would be please try with the subsequent i-build? This made it into the latest eclipse/equinox I20181212-0230 builds: https://download.eclipse.org/equinox/drops/I20181212-0230/ https://download.eclipse.org/eclipse/downloads/drops4/I20181212-0230/ Thanks - this was actually a bug from ESH/openHAB and I'll need to get them to pickup on the fix to be able to test it properly. I'll let you know... |