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

If-Modified-Since = 0 raise java.lang.IllegalArgumentException: Invalid format: "0" exception #126

Closed
AlexanderRay opened this issue Mar 10, 2015 · 2 comments

Comments

@AlexanderRay
Copy link

    angular.forEach(httpMethods, (method) ->
      $httpProvider.defaults.headers[method] ?= {}
      $httpProvider.defaults.headers[method]['If-Modified-Since'] = '0'
    )

raise a runtime exception in play framework 2.3.8.

java.lang.IllegalArgumentException: Invalid format: "0"
        at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:873) ~[joda-time-2.3.jar:2.3]
        at controllers.AssetInfo$.parseDate(Assets.scala:106) ~[play_2.11-2.3.7.jar:2.3.7]
        at controllers.AssetsBuilder$$anonfun$controllers$AssetsBuilder$$maybeNotModified$3.apply(Assets.scala:326) [play_2.11-2.3.7.jar:2.3.7]
        at controllers.AssetsBuilder$$anonfun$controllers$AssetsBuilder$$maybeNotModified$3.apply(Assets.scala:325) [play_2.11-2.3.7.jar:2.3.7]
        at scala.Option.flatMap(Option.scala:171) [scala-library-2.11.5.jar:na]

can you change it to

    angular.forEach(httpMethods, (method) ->
      $httpProvider.defaults.headers[method] ?= {}
      $httpProvider.defaults.headers[method]['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT'
    )
@lynndylanhurley
Copy link
Owner

Sure thing, thx for the report.

@lynndylanhurley
Copy link
Owner

Just fixed in version 0.0.25-beta1 - please confirm!

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

No branches or pull requests

2 participants