-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update URLConstructor.java #322
Conversation
The method didn't work for the default URL style, causing PAGE_REQUESTED and PAGE_DELIVERED events to have a null page name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Added in 2.12.2-git-09, thanks! |
This patch actually causes problems: something is off with encoding, so that umlauts are mangled during saving. This happens because of the call to getParameter. If (in WikiJSPFIlter) the method is called before the super.doFilter call, the problem occurs. After doFilter, calling it causes no problem. Rewriting the method so it looks at the query string solves the problem:
But I don't know enough of what is happening here to understand whether that is the right thing to do. Apparently, calling getParameter has side effects that affect encoding. |
the latter commits the response, causing errors later on the filter chain, f.ex. when trying to create a session b/c of the response has being previously committed - fixes error related to #322
Hi @udittmer, I think that the problem comes from using thx + best regards, |
No, that doesn't make a difference - any umlauts being saved are mangled. My encoding is UTF-8, in case that makes a difference, and useEncoding is true. I played around a bit with encoding handling in WikiJSPFilter, but I'm confused with how useEncoding, m_wiki_encoding, m_engine.getContentEncoding() and response.getCharacterEncoding() are supposed to work together. m_wiki_encoding gets initialized, but doesn't seem to be used. The strange thing is that umlauts are shown fine in the preview. |
…tor#parsePageFrom URL in order to ensure the proper encoding is set. (related to error noted at #322)
Hi @udittmer ! would you mind trying 2.12.2-git-11 to see if the issue persists? The next filter on the filter chain after // Set the character encoding
httpRequest.setCharacterEncoding( m_engine.getContentEncoding().displayName() ); a quick peek at that javadoc method yields
So the initial fix was most probably rendering this call useless, hence the errors you were expecting. I've added that call prior to the HTH! |
Yes! Now saving umlauts works fine. Thank you very much! |
The method didn't work for the default URL style, causing PAGE_REQUESTED and PAGE_DELIVERED events to have a null page name.