Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

proxy/history generates invalid json #2

Open
tisztamo opened this issue Apr 25, 2013 · 1 comment
Open

proxy/history generates invalid json #2

tisztamo opened this issue Apr 25, 2013 · 1 comment

Comments

@tisztamo
Copy link

Somehow the HttpMessageList gets converted to a json which starts like this:

{"message":[{"messages":{"host":"xxx.com","port":80,"protocol":"http","request": ...

And the object has more "messages" attributes so after parsing it (at least in webkit) is just an array with 1 object which contains the last request in the history.

My solution was to remove Line 47 from HttpMessageList.java:
@XmlElementWrapper(name = "message")

so the output will look like this:
"messages":[{"host":"xxx.com","port":80,"protocol":"http","request":....

I don't know jersey deeply so I don't understand the cause but the extra "message" element is unneeded anyway.

Thanks for your work guys!

@iriusrisk
Copy link
Collaborator

Thanks for this! I vaguely remember complications with the jersey json generation during testing, I'll make your change and see whether it works for my test cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant