Skip to content
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

format null as \u0000 when calling with --json #214

Closed
wants to merge 20 commits into from

Conversation

jacobmealey
Copy link
Contributor

trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
@@ -263,8 +269,8 @@ struct option {
};

#define MAX_QPAIRS 1000
char *qpairs[MAX_QPAIRS]; /* encoded */
char *qpairsdec[MAX_QPAIRS]; /* decoded */
struct string qpairs[MAX_QPAIRS]; /* encoded */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the point of this change for encoded qpairs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make it easier to have both types using the same layout so switching between them gets easy.

trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
trurl.c Outdated Show resolved Hide resolved
bagder pushed a commit to curl/curl that referenced this pull request Jul 9, 2023
Control characters without a special escape sequence e.g. %00 or %06
were being encoded as "u0006" instead of "\u0006".

Ref: curl/trurl#214 (comment)
Closes #11414
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
Control characters without a special escape sequence e.g. %00 or %06
were being encoded as "u0006" instead of "\u0006".

Ref: curl/trurl#214 (comment)
Closes curl#11414
Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good. Can you have a look at the little merge conflict and I'll be ready to merge!

@jacobmealey
Copy link
Contributor Author

Ahh there we go! it should be all set to merge now bagder, thanks!

@bagder bagder closed this in 268c778 Aug 7, 2023
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
Control characters without a special escape sequence e.g. %00 or %06
were being encoded as "u0006" instead of "\u0006".

Ref: curl/trurl#214 (comment)
Closes curl#11414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query params values in JSON output have NUL replaced by .
3 participants