Tweaks to Javascript Responses with RestHeloper #1024

Closed
indrajitr opened this Issue May 28, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@indrajitr
Member

indrajitr commented May 28, 2011

No description provided.

@indrajitr

This comment has been minimized.

Show comment
Hide comment
@indrajitr

indrajitr May 28, 2011

Member

This ticket references this conversation in the mailing list:

https://groups.google.com/group/liftweb/browse_thread/thread/14fe3e678380c69c#

Problems:

  1. Using JE.Call to construct a JsonP response object results in a JsonResponse. It should be a JavascriptResponse as JsonP is a method call.
  2. The existing JavascriptResponse object returns the content type of "text/javascript". RFC 4329 (http://www.rfc-editor.org/rfc/rfc4329.txt) recommends using
    "application/javascript" as 'Use of the "text" top-level type for this kind of content is known to be problematic

Proposed solution:

  1. RestHelper should implicitly convert JsExp into JavascriptResponses.
    See https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/rest/RestHelper.scala#L611
  2. JavascriptResponses should return the Content-Type of "application/javascript" (instead of text/javascript)
    See https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/LiftResponse.scala#L263

Cheers!

Member

indrajitr commented May 28, 2011

This ticket references this conversation in the mailing list:

https://groups.google.com/group/liftweb/browse_thread/thread/14fe3e678380c69c#

Problems:

  1. Using JE.Call to construct a JsonP response object results in a JsonResponse. It should be a JavascriptResponse as JsonP is a method call.
  2. The existing JavascriptResponse object returns the content type of "text/javascript". RFC 4329 (http://www.rfc-editor.org/rfc/rfc4329.txt) recommends using
    "application/javascript" as 'Use of the "text" top-level type for this kind of content is known to be problematic

Proposed solution:

  1. RestHelper should implicitly convert JsExp into JavascriptResponses.
    See https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/rest/RestHelper.scala#L611
  2. JavascriptResponses should return the Content-Type of "application/javascript" (instead of text/javascript)
    See https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/LiftResponse.scala#L263

Cheers!

@indrajitr

This comment has been minimized.

Show comment
Hide comment
@indrajitr

indrajitr Jul 21, 2011

Member

Updating tickets (#919, #938, #950, #956, #976, #980, #982, #999, #1008, #1024, #1025, #1032, #1034, #1051)

Member

indrajitr commented Jul 21, 2011

Updating tickets (#919, #938, #950, #956, #976, #980, #982, #999, #1008, #1024, #1025, #1032, #1034, #1051)

@dpp

This comment has been minimized.

Show comment
Hide comment
@dpp

dpp Aug 26, 2011

Member

(In [[r:dd83b199d6ca6a377f4ac24c3ad342a1a378c246]]) Closes #1024 (aka 2^10). Fixed implicit conversions and fixed up some header, etc. stuff on responses

Branch: master

Member

dpp commented Aug 26, 2011

(In [[r:dd83b199d6ca6a377f4ac24c3ad342a1a378c246]]) Closes #1024 (aka 2^10). Fixed implicit conversions and fixed up some header, etc. stuff on responses

Branch: master

@github-importer

This comment has been minimized.

Show comment
Hide comment

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment