Illegal 'Last-Modified' header

48 views
Skip to first unread message

Leon Ma

unread,
Mar 13, 2015, 2:57:10 AM3/13/15
to spray...@googlegroups.com
Hi,

For every request, I saw below log:

2015-03-12 16:44:32,417 WARN [akka.actor.default-dispatcher-4] HttpClientConnection akka://squbs/user/IO-HTTP/group-0/9123 Illegal response header: Illegal 'Last-Modified' header: Invalid input '+', expected "GMT" or "UTC" (line 1, pos 27):
Thu, 12 Mar 2015 23:44:32 +0000

Questions:

1. Is this format a real bad one? (Can not be recognized by browser?) Or just a strict validation in spray side?
2. Can I disable such kind of validation?


Thanks
Leon


Age Mooij

unread,
Mar 13, 2015, 6:54:50 AM3/13/15
to spray...@googlegroups.com
Hi Leon

Spray implements the Http spec strictly and the http spec defines three “acceptable” date formats, two of which are strongly deprecated and only supposed to be supported in the context of Http 1.0. Here’s the relevant section of the spec:


Your example date is not a valid Http date and is therefor strictly illegal.

Is this something you can fix on the server you are calling?

You can turn off these warnings by setting the illegal-header-warnings property of spray.can.server.parsing and/or spray.can.client.parsing. The unparsed Last-Modified header will still be available to you as a so-called RawHeader.


Hope this helps
Age



--
You received this message because you are subscribed to the Google Groups "spray.io User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/spray-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/3c8a27f0-db15-4e24-84e7-82f01ac762c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Leon Ma

unread,
Mar 14, 2015, 5:39:55 AM3/14/15
to spray...@googlegroups.com
Thanks so much for the detailed explanation !

Leon


在 2015年3月13日星期五 UTC-7上午3:54:50,Age Mooij写道:
Reply all
Reply to author
Forward
0 new messages