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

memgator may generate invalid JSON for timemap response #48

Closed
ikreymer opened this issue Nov 20, 2015 · 2 comments
Closed

memgator may generate invalid JSON for timemap response #48

ikreymer opened this issue Nov 20, 2015 · 2 comments
Labels
Milestone

Comments

@ikreymer
Copy link

I noticed this as part of the response for timemap for http://eff.org/ using the standard archives:

      {
        "datetime": "2011-12-07T20:51:07Z",
        "uri": "http://webarchive.loc.gov/all/20111207205107/https://www.eff.org/%!"(MISSING)
      },

Looking at the timemap from webarchive.loc.goc, it looks like it returns:

<http://webarchive.loc.gov/all/20111207205107/https://www.eff.org/%20>; rel="memento"; datetime="Wed, 07 Dec 2011 20:51:07 GMT",

so the MISSING thing is being added by memgator somehow..

@ibnesayeed ibnesayeed added the bug label Nov 20, 2015
@ibnesayeed ibnesayeed added this to the 1.0 milestone Nov 20, 2015
@ibnesayeed
Copy link
Member

Explanation: The string was being serialized correctly, but at the time of writing it to the response writer object it was being interpolated again and the fmt package tried to replace %20 with an operand that was not present.

TODO: I need to globally update the script to use formatting functions such as Print, Println, Printf, Fprint, Fprintf, Fprintln etc. in a coherent manner.

@ikreymer
Copy link
Author

Great, thanks for the quick fix!

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

No branches or pull requests

2 participants