Skip to content

allow json values containing colon - fixes #62#69

Open
grmble wants to merge 1 commit into
astaxie:masterfrom
grmble:master
Open

allow json values containing colon - fixes #62#69
grmble wants to merge 1 commit into
astaxie:masterfrom
grmble:master

Conversation

@grmble

@grmble grmble commented Jul 4, 2018

Copy link
Copy Markdown

I need to post JSON containing Lucene queries, that tends to contain colons. E.g. q=cm:title:foo

That did not work though, bat tries to parse it as a header and then complains about the equal sign.

There is an issue open for this: #62

I don't much like this solution, I think the function is too compliated as is. But I could not come up with anything simpler, and I've been using this for a week now.

e.g q=cm:creator=UserName
@dch

dch commented Aug 27, 2018

Copy link
Copy Markdown

does #70 also resolve your issue?

@grmble

grmble commented Aug 27, 2018

Copy link
Copy Markdown
Author

@dch I don't think so - #70 just tries raw json before headers and params (in the context of wanting to use params with a colon - I am aware that it actually does more than that)

My problem is that headers are tried before params, and a param containing a colon will be interpreted as a (faulty) header.

Simply changing the order so params are checked before headers does not work either, that would break headers containing an equal sign. Which is what #59 fixed ...

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.

2 participants