when I `install(HttpCookies)` on apache client and...
# ktor
t
when I
install(HttpCookies)
on apache client and make a call I get issue
DateTimeParseException: Text 'Mon, 13-Aug-2018 07:33:04 GMT' could not be parsed at index 7
I suppose I have to specify a datetime format somewhere but I haven’t been able to find how to do this
👀 1
e
Hi, @Tim Castelijns. Thanks for the report. Could you share the stack trace?
t
stacktrace.txt
e
There is no custom date format supported in cookies feature. It use `HttpDate`(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date) format by default(as in spec)
It looks like the date is not properly formatted:
Mon, 13-Aug-2018 07:41:51 GMT
should be
Mon, 13 Aug 2018 07:41:51 GMT
Could you share some code of setting cookies to clarify the bug?
t
but this is the date the in the response, right? I cannot alter it
I’m calling a 3rd party (stackoverflow) url
I just have this|
Copy code
val client = HttpClient(Apache) {
        install(HttpCookies) {
            storage = AcceptAllCookiesStorage()
        }
    }
e
Oh, I see. Stackoverflow use custom date format with dashes. Could you try the same request with ktor
0.9.4-alpha-2
?
I also made an issue to support custom date formats https://github.com/ktorio/ktor/issues/519
t
I have some more ktor dependencies that all use the same version. Just changed from 0.9.3 to 0.9.4-alpha2 but getting some unresolved errors
e.g. ktor-html-builder and others. Should I keep them at 0.9.3?
sorry my bad I used alpha2 instead of alpha-2
seems to work now, thanks 🙂
🎉 1
e
Awesome 🙂
t
may I bother you for something else as well?
e
Sure 🙂
t
my console is often spammed with the following error
Copy code
Aug 14, 2018 10:10:39 AM com.google.common.util.concurrent.AbstractFuture executeListener
SEVERE: RuntimeException while executing runnable com.google.common.util.concurrent.Futures$4@2d9866b5 with executor MoreExecutors.directExecutor()
java.lang.RuntimeException: com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: The request is missing a valid API key.
e
Unfortunately, I'm out of context here. I need at least the stack trace 😞
t
ok
stacktrace2.txt
I took cut/pasted one of the ktor-samples and imported it as separate project. It was already occurring before I added my own code
thanks for the work btw 🙂 ktor seems really nice, I just started playing with it this week
e
It look's like the limitation of gcp app. @Deactivated User did you face with that early?
d