Closed zachlowry closed 8 years ago
I think all of your notes are addressed, can you review @brianjmiller? Thanks!
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)
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.
Test has been confirmed to pass against Watershed LRS. I'm, :thumbsup: over to you @bscSCORM.
@zachlowry back to you with some comments
@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.
@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.
Let's get this moving along @brianjmiller
@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.
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.
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?
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.
Moved this to a new PR because I messed up my upstream while creating the other PR.