Skip to content

Navigation Menu

Sign up

Add support for GZipped contents. - #17

Closed
zachlowry wants to merge 3 commits into
master from
gzip
Closed

zachlowry wants to merge 3 commits into
master from
gzip

Conversation

@zachlowry

@zachlowry zachlowry commented Feb 18, 2014

Copy link
Copy Markdown
Contributor

Moved this to a new PR because I messed up my upstream while creating the other PR.

Copy link
Copy Markdown
Contributor Author

I think all of your notes are addressed, can you review @brianjmiller? Thanks!

Copy link
Copy Markdown
Member

Test doesn't seem to be passing against SCORM Cloud. I get:

Tests run: 22, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.59 sec <<< FAILURE!
testSaveStatementGZIP(com.rusticisoftware.tincan.RemoteLRSTest) Time elapsed: 0.077 sec <<< ERROR!
com.rusticisoftware.tincan.exceptions.UnexpectedHTTPResponse: Unexpected HTTP Response
at com.rusticisoftware.tincan.RemoteLRS.saveStatement(RemoteLRS.java:268)
at com.rusticisoftware.tincan.RemoteLRSTest.testSaveStatementGZIP(RemoteLRSTest.java:151)

Copy link
Copy Markdown
Member

Returning a 400 error reading:

Object with name 'statement' could not be created from the provided JSON. Error message: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens at line 1, column 2, near:
... ...

Guessing no likey the compression. I'm wondering whether there needs to be some sort of LRS detection of this.

Copy link
Copy Markdown
Member

Test has been confirmed to pass against Watershed LRS. I'm, 👍 over to you @bscSCORM.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

close() should be done in a finally block

Copy link
Copy Markdown
Member

@zachlowry back to you with some comments

Copy link
Copy Markdown
Contributor Author

@bscSCORM @brianjmiller We ended up not needing this, so if it's not of any use feel free to close the PR. I won't likely have a chance to address anything with it in the near term.

Copy link
Copy Markdown
Member

@brianjmiller to you then, to fix up or close -- might not be a high priority, but seems like it would be a good feature to have.

Copy link
Copy Markdown
Contributor

Let's get this moving along @brianjmiller

Copy link
Copy Markdown
Member

@tseabrooks do we have a push from someone specific on it? Otherwise I'd likely let it land after the RemoteLRS rewrite changes which I'm trying to get merged in.

Copy link
Copy Markdown
Member

See PR #27, once that merges then we'll need to rework this to match changes there + add the ability to provide the thread pool.

Copy link
Copy Markdown
Member

actually, I didn't think about this being a problem the first time around, but that PR puts gzip compression on the request
whereas HTTP defines how to negotiate it on the response only
AFAIK there is no requirement for a server to support a gzip request , so it seems like the only safe way to do it is to try a small gzipp reqquest (mabye to about) , and then carry on with gzip only if that works
regarding responses, cloud not supporting gzip shouldn't cause an error, as the client can say it supports gzip, but responding with gzip is optional
@brian.miller: does that make sense to you?

Copy link
Copy Markdown
Member

This has been left open pending looking at the thread handling, etc. I have new commits building on the Jetty 9 upgrade (which I believe gets rid of the thread pooling anyways) that will land that will allow a user to set their own HTTP client object so closing this.

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

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /