Illegal 'Last-Modified' header

瀏覽次數:48 次
跳到第一則未讀訊息

Leon Ma

未讀,
2015年3月13日 凌晨2:57:102015/3/13
收件者: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

未讀,
2015年3月13日 清晨6:54:502015/3/13
收件者: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

未讀,
2015年3月14日 清晨5:39:552015/3/14
收件者:spray...@googlegroups.com
Thanks so much for the detailed explanation !

Leon


在 2015年3月13日星期五 UTC-7上午3:54:50,Age Mooij写道:
回覆所有人
回覆作者
轉寄
0 則新訊息