-
Notifications
You must be signed in to change notification settings - Fork 39
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
Pr/decode options #725
Pr/decode options #725
Conversation
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.
This is more a comment / question than a request for changes: Why don't you simply use the coder version of URLDecodeInPlace from nxcomp straight away?
We need to make URLDecodeInPlace a public symbol and then simply include NX.h in Args.c.
*to = '\0'; | ||
} | ||
} | ||
|
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.
Why copy of code here? We should rather use the version found in nxcomp, shouldn't we?
I wrote that in the PR comment: I could not manage to make it work.
Besides: the nxagent does not seem to be using any nxcomp function.
…On Fri, Aug 24, 2018 at 11:00 AM, Mike Gabriel ***@***.***> wrote:
@sunweaver commented on this pull request.
This is more a comment / question than a request for changes: Why don't you
simply use the coder version of URLDecodeInPlace from nxcomp straight away?
We need to make URLDecodeInPlace a public symbol and then simply include
NX.h in Args.c.
________________________________
In nx-X11/programs/Xserver/hw/nxagent/Args.c:
> + while (str[0])
+ {
+ if ((str[0] == '%') &&
+ (hexval(str[1]) >= 0) &&
+ (hexval(str[2]) >= 0))
+ {
+ *(to++) = hexval(str[1]) * 16 + hexval(str[2]);
+ str += 3;
+ }
+ else
+ *(to++) = *(str++);
+ }
+ *to = '\0';
+ }
+}
+
Why copy of code here? We should rather use the version found in nxcomp,
shouldn't we?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
new name is more descriptive
Same as in nxcomp's option handling. We really only need it for "," (%2C) and "=" (%3D), currently, but it can handle all encoded characters.
7db35ae
to
30a9627
Compare
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.
Ok, then...
decode URL encoded characters in options string. This is a much lighter (and cleaner) solution for the problem that #551 tries to solve.
(I did not succeed in linking the URLdecode stuff from nxcomp so I cloned it. If I get that right nxagent is not using anything from nxcomp directly currently.)