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

Ember: Chunked Default like Blaze Semantics #3789

Merged
merged 2 commits into from Oct 28, 2020

Conversation

ChristopherDavenport
Copy link
Member

Adds 0/crlf/crlf 5 bytes to every empty request/response and transfer-encoding is just a longer string as well.

But puts us in line with blaze without the cheating based on knowing the buffer is empty.

@ChristopherDavenport ChristopherDavenport changed the title Chunked Default to Default To Blaze Semantics Ember: Chunked Default to Default To Blaze Semantics Oct 28, 2020
@ChristopherDavenport ChristopherDavenport changed the title Ember: Chunked Default to Default To Blaze Semantics Ember: Chunked Default like Blaze Semantics Oct 28, 2020
@ChristopherDavenport
Copy link
Member Author

ChristopherDavenport commented Oct 28, 2020

Doesn't appear related. Looks like traversal can still be a problem. Also, that is one messed up uri

Error:    ! preserve uri.scheme (599 ms)
Error:     org.http4s.ember.core.Parser$Request$ReqPrelude$ParsePreludeError: Exception raised on property evaluation.> ARG_0: Request(method=ACL, uri=https://@*(@~/-%28%C6/%7C::;@,(_/6%BF@/%05'@!$)%C6'@:~::?%E6%A9%9D%EA%B8%AD=%E2%9A%A9%D4%BF%EB%A5%8B&=%EA%90%AC%E9%B8%A8%E2%A4%87%E4%85%B9%E7%9B%BF%D8%AF%E8%B3%81%E0%AD%9E%ED%9B%92%E2%BB%91%EB%BA%92%E1%91%BC%CC%B9&%EC%B0%83%E7%9C%86%E8%9E%9C%E5%89%85%EC%B3%8B%E8%A8%B9%E9%87%B5%ED%91%8D%E2%8C%8D%E4%90%85%E1%B4%A0%E4%BC%86%E3%89%8D%E8%9E%98%E5%B2%85=%EC%85%87%EF%90%8C%EB%B5%87%EA%95%87%E8%BF%B8%E7%BE%90%E5%85%A2%EF%9F%BE%EF%AB%9D%EB%88%B2%E9%95%87%E8%A9%80%E5%85%A1%E9%86%91%EE%A1%BD&foo=bar&%E6%BA%B9%E2%AD%8E%ED%82%AC%E5%AF%B0%EB%9F%B7%EB%97%A0%E4%93%B7%E5%87%B5=%E1%B0%A7%E0%AC%AF&%E5%99%82=%E8%A2%82%E3%B8%BE%C6%A9%E9%9E%9E%E1%9A%90%EA%A5%90%E4%9E%9D%EC%91%B1%E5%BE%A7%EE%85%BB%EC%AD%AC%C7%82&foo=bar#//???, headers=Headers(Content-Length: 8669591250010125511, Date: Sat, 19 Aug 9865 18:33:21 GMT, Allow: UNBIND, CHECKIN, UNLOCK, A|!, PATCH, HEAD, COPY, Content-Length: 9086700979157465331, Allow: PUT))> Exception: org.http4s.ember.core.Parser$Request$ReqPrelude$ParsePreludeError: Parse Prelude Error Encountered - Partially Decoded: Some(ACL) None None
Error:     The seed is PiAD_ZoJaZh15c0soRHCI5cTEjY_Ziq3VNc_r_uJDjE=
Error:     
Error:     > caused by org.http4s.ParseFailure: Invalid URI: Invalid input '@', expected Unreserved, PctEncoded, SubDelims, Port, PathAbempty, '?', '#' or 'EOI' (line 1, column 12):
Error:     https://@*(@~/-%28%C6/%7C::;@,(_/6%BF@/%05'@!$)%C6'@:~::?%E6%A9%9D%EA%B8%AD=%E2%9A%A9%D4%BF%EB%A5%8B&=%EA%90%AC%E9%B8%A8%E2%A4%87%E4%85%B9%E7%9B%BF%D8%AF%E8%B3%81%E0%AD%9E%ED%9B%92%E2%BB%91%EB%BA%92%E1%91%BC%CC%B9&%EC%B0%83%E7%9C%86%E8%9E%9C%E5%89%85%EC%B3%8B%E8%A8%B9%E9%87%B5%ED%91%8D%E2%8C%8D%E4%90%85%E1%B4%A0%E4%BC%86%E3%89%8D%E8%9E%98%E5%B2%85=%EC%85%87%EF%90%8C%EB%B5%87%EA%95%87%E8%BF%B8%E7%BE%90%E5%85%A2%EF%9F%BE%EF%AB%9D%EB%88%B2%E9%95%87%E8%A9%80%E5%85%A1%E9%86%91%EE%A1%BD&foo=bar&%E6%BA%B9%E2%AD%8E%ED%82%AC%E5%AF%B0%EB%9F%B7%EB%97%A0%E4%93%B7%E5%87%B5=%E1%B0%A7%E0%AC%AF&%E5%99%82=%E8%A2%82%E3%B8%BE%C6%A9%E9%9E%9E%E1%9A%90%EA%A5%90%E4%9E%9D%EC%91%B1%E5%BE%A7%EE%85%BB%EC%AD%AC%C7%82&foo=bar#//???
Error:                ^ (Parser.scala:318)
Error:  org.http4s.ember.core.Parser$Request$ReqPrelude$.preludeInSection(Parser.scala:318)
Error:  org.http4s.ember.core.Parser$Request$ReqPrelude$.$anonfun$parsePrelude$1(Parser.scala:196)
Error:  org.http4s.ember.core.Parser$Request$ReqPrelude$.$anonfun$parsePrelude$1$adapted(Parser.scala:190)
Error:  fs2.Pull$.$anonfun$flatMap$1(Pull.scala:64)
Error:  fs2.internal.FreeC$$anon$1.cont(Algebra.scala:33)
Error:  fs2.internal.FreeC$ViewL$$anon$9$$anon$10.<init>(Algebra.scala:222)
Error:  fs2.internal.FreeC$ViewL$$anon$9.cont(Algebra.scala:222)
Error:  fs2.internal.FreeC$ViewL$$anon$9$$anon$10.cont(Algebra.scala:224)
Error:  fs2.internal.FreeC$ViewL$.mk(Algebra.scala:213)
Error:  fs2.internal.FreeC$ViewL$.apply(Algebra.scala:202)
Error:  fs2.internal.FreeC.viewL(Algebra.scala:86)
Error:  fs2.internal.FreeC$.go$1(Algebra.scala:399)
Error:  fs2.internal.FreeC$.$anonfun$compile$8(Algebra.scala:449)
Error:  fs2.internal.FreeC$.$anonfun$compile$1(Algebra.scala:415)
Error:  flatMap @ fs2.internal.CompileScope.$anonfun$openAncestor$2(CompileScope.scala:231)
Error:  flatMap @ fs2.internal.FreeC$.$anonfun$compile$15(Algebra.scala:517)
Error:  map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:216)
Error:  flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:215)
Error:  map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:191)
Error:  flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:214)
Error:  map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:216)
Error:  flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:215)
Error:  map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:191)
Error:  flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:214)
Error:  map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:191)
Error:  flatMap @ fs2.internal.CompileScope.$anonfun$close$2(CompileScope.scala:212)
Error:  flatMap @ fs2.internal.CompileScope.close(CompileScope.scala:211)
Error:  traverse @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:191)
Error:  traverse @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:191)
Error:  map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:191)
Error:  CAUSED BY
Error:   org.http4s.ParseFailure: Invalid URI: Invalid input '@', expected Unreserved, PctEncoded, SubDelims, Port, PathAbempty, '?', '#' or 'EOI' (line 1, column 12):
Error:   https://@*(@~/-%28%C6/%7C::;@,(_/6%BF@/%05'@!$)%C6'@:~::?%E6%A9%9D%EA%B8%AD=%E2%9A%A9%D4%BF%EB%A5%8B&=%EA%90%AC%E9%B8%A8%E2%A4%87%E4%85%B9%E7%9B%BF%D8%AF%E8%B3%81%E0%AD%9E%ED%9B%92%E2%BB%91%EB%BA%92%E1%91%BC%CC%B9&%EC%B0%83%E7%9C%86%E8%9E%9C%E5%89%85%EC%B3%8B%E8%A8%B9%E9%87%B5%ED%91%8D%E2%8C%8D%E4%90%85%E1%B4%A0%E4%BC%86%E3%89%8D%E8%9E%98%E5%B2%85=%EC%85%87%EF%90%8C%EB%B5%87%EA%95%87%E8%BF%B8%E7%BE%90%E5%85%A2%EF%9F%BE%EF%AB%9D%EB%88%B2%E9%95%87%E8%A9%80%E5%85%A1%E9%86%91%EE%A1%BD&foo=bar&%E6%BA%B9%E2%AD%8E%ED%82%AC%E5%AF%B0%EB%9F%B7%EB%97%A0%E4%93%B7%E5%87%B5=%E1%B0%A7%E0%AC%AF&%E5%99%82=%E8%A2%82%E3%B8%BE%C6%A9%E9%9E%9E%E1%9A%90%EA%A5%90%E4%9E%9D%EC%91%B1%E5%BE%A7%EE%85%BB%EC%AD%AC%C7%82&foo=bar#//???
Error:              ^ (file:1)

@rossabaker
Copy link
Member

Yeah, that's property testing doing something completely unrealistic. Don't let it block this, but we should clean it up.

@rossabaker rossabaker merged commit a19ce71 into http4s:series/0.21 Oct 28, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants