Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

scalaj-http doesn't set default "User-Agent" value into HTTP request headers. #27

@kypeli

Description

@kypeli

scala> val html = Http("http://www.questionablecontent.net").asString
scalaj.http.HttpException: 403: Forbidden
at scalaj.http.Http$Request.process(Http.scala:125)
at scalaj.http.Http$Request.apply(Http.scala:102)
at scalaj.http.Http$Request.asString(Http.scala:151)
at .(:11)
at .()
at .(:7)
at .()
at $print()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
...

kypeli@iceberg:~$ curl -I http://www.questionablecontent.net
HTTP/1.1 200 OK
Server: cloudflare-nginx
Date: Sun, 21 Jul 2013 11:40:50 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.4.13
Set-Cookie: __cfduid=dd4e453443f2d6171976787db3fdf55c81374406850; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.questionablecontent.net
CF-RAY: 9179e60760306dc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions