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

WEBrick::HTTPStatus::LengthRequired error in HttpRequest.rb #44

Open
mgage opened this issue Dec 14, 2012 · 0 comments
Open

WEBrick::HTTPStatus::LengthRequired error in HttpRequest.rb #44

mgage opened this issue Dec 14, 2012 · 0 comments

Comments

@mgage
Copy link
Contributor

mgage commented Dec 14, 2012

Hi, I get this error :

info:12/14/12 14:39:09> HTTPServ starting
info:12/14/12 14:39:09> Config file "config.yml" read
info:12/14/12 14:39:09> HTTPServ started
info:12/14/12 14:39:09> TcpServer#start : pid=7506 ip=0.0.0.0 port=8080
listening
have client

TCPSocket:0x000001008c59a0

some client is coming
POST /mod_xmlrpc HTTP/1.1
debug:12/14/12 14:39:37> POST /mod_xmlrpc HTTP/1.1
error:12/14/12 14:39:37> WEBrick::HTTPStatus::LengthRequired: WEBrick::HTTPStatus::LengthRequired
/usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/webrick/httprequest.rb:364:in `read_body'
listening

have client

Perhaps the content length isn't being read? Are the extra headers confusing
HttpRequest.rb

Any ideas or comments?

Thanks.
-- Mike

Here is what the input looks like (courtesy of nc ---- net cat )

cartan-home:client gage$ nc -l 0.0.0.0 8080

POST /mod_xmlrpc HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Host: 0.0.0.0:8080
User-Agent: SOAP::Lite/Perl/0.715
Content-Length: 12745
Content-Type: text/xml

WebworkXMLRPC.renderProblemsourceIyNERVNDUklQVElPTgojIyAgQSB2ZXJ5IHNpbXBsZSBmaXJzdCBwcm9ibGVtCiMjRU5EREVTQ1JJ

UFRJT04KIyNLRVlXT1JEUygnYWxnZWJyYScpCkRPQ1VNRU5UKCk7ICAgICAgICAjIFRoaXMgc2hv
dWxkIGJlIHRoZ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
modejsMathuserIDgagepassworddhilbertsite_passwordenvirwebworkDocsURLnot definedsessionKeyNot defineddisplayModejsMathdueDate4014438528fileNameWebworkClient.pm:: define fileName in environmentstudentNameMike GagenumZeroLevelDefault1e-06numAbsTolDefault1e-07numZeroLevelTolDefault1e-06numOfAttempts0functLLimitDefault0functAbsTolDefault1e-07server_root_urlfoobarfoobarnumFormatDefault%0.13ghtmlDirectorynot definedexternalPng2EpsPathnot definedshowSolutions1cgiURLfoobarNot definedcourseScriptsDirectorynot definedPRINT_FILE_NAMES_FORgagecourseNameNot definedhtmlURLnot definedformattedDueDate6/19/00questionNumber1permissionLevel10problemSeed1234functULimitDefault1CAPA_Tools/ww/webwork/CAPA/CAPA_Tools/showHints1numRelPercentTolDefault0.0001tempURLnot definedstudentLogingageproblemValue1templateDirectorynot definedpsvn54321CAPA_Graphics_URLhttp://webwork-db.math.rochester.edu/capa_graphics/sectionNameGageexternalTTHPath/usr/local/bin/tthfunctRelPercentTolDefault1e-06functZeroLevelDefault1e-06probFileNameinput.txtfunctMaxConstantOfIntegration1000000000000inputs_refAnSwEr0002AnSwEr0001AnSwEr0003CAPA_GraphicsDirectory/ww/webwork/CAPA/CAPA_Graphics/macroDirectorynot definedprobNum13CAPA_MCTools/ww/webwork/CAPA/CAPA_MCTools/functNumOfPoints5functZeroLevelTolDefault1e-06tempDirectorynot definedsetNumbernot definedopenDate3014438528classDirectoryNot definedeffectivePermissionLevel10externalGif2EpsPathnot definedanswerDate4014438528cgiDirectoryNot definedformattedOpenDate6/19/00scriptDirectoryNot definedfunctVarDefaultxformattedAnswerDate6/19/00sectionNumber1commandrenderProblemcoursesession_keypwextra_packages_to_loadAlgParserWithImplicitExpandExprExprWithImplicitExpandAnswerEvaluatorAnswerEvaluatorMakermodules_to_evaluateExporterDynaLoaderGDWWPlotFunCircleLabelPGrandomUnitsHermiteListMatchMultipleSelectAlgParserAnswerHashFractionVectorFieldComplex1ComplexMatrixReal1MatrixDistributionsRegressionlibrary_nameLibraryproblem_staterecorded_score1num_of_incorrect_ans4num_of_correct_ans0courseNamegage_coursecourseIDgage_courseanswer_form_submitted1

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

1 participant