Opened 6 years ago

Closed 6 years ago

#3605 enhancement closed fixed (fixed)

Factor "identity" transfer encoding support out of HTTPChannel.rawDataReceived into an object like the chunked transfer encoding object

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: Branch: branches/identity-transfer-encoding-3605
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

Description

This will simplify rawDataReceived and make the code re-usable by the HTTP client.

Change History (7)

comment:1 Changed 6 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/identity-transfer-encoding-3605

(In [25869]) Branching to 'identity-transfer-encoding-3605'

comment:2 Changed 6 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted

Please review.

The noMoreData methods may seem like a strange addition since there are no callers. However, the HTTP client will call this method. Since I developed this code in the client branch, I'd already written them and the tests. It seems like a waste of time to try to split up this code any more. Once the HTTP client code is merged, there will be callers.

comment:3 Changed 6 years ago by therve

  • Keywords review removed
  • Owner set to exarkun

I just have one question: why making _DataLoss private and PotentialDataLoss public? Can you add a small comment in the source to explain that?

Otherwise, this is nice, please merge.

comment:4 Changed 6 years ago by exarkun

(In [25946]) expand _DataLoss docstring

refs #3605

comment:5 Changed 6 years ago by exarkun

(In [25947]) expand PotentialDataLoss docstring a bit

refs #3605

comment:6 Changed 6 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(In [25948]) Merge identity-transfer-encoding-3605

Author: exarkun, itamar
Reviewer: therve
Fixes: #3605
Refs: #886

Add an identity transfer-encoding decoder, similar to the chunked transfer-encoding
decoder, to twisted.web.http and use it to simplify HTTPChannel slightly by
removing the knowledge of any particular transfer-encoding from its request body
handling code.

Also expand the transfer-encoding decoder interface so that it will be useful for
an HTTP client and rename the chunked decoder so that its name more closely reflects
what it does.

comment:7 Changed 3 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.