D963: hgweb: in protocol adapter, look for bytes instances, not str

2017-10-05 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D963

AFFECTED FILES
  mercurial/hgweb/protocol.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py
+++ b/mercurial/hgweb/protocol.py
@@ -164,7 +164,7 @@
 yield chunk
 
 rsp = wireproto.dispatch(repo, p, cmd)
-if isinstance(rsp, str):
+if isinstance(rsp, bytes):
 req.respond(HTTP_OK, HGTYPE, body=rsp)
 return []
 elif isinstance(rsp, wireproto.streamres):



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D963: hgweb: in protocol adapter, look for bytes instances, not str

2017-10-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  FWIW, I've written extensions that have returned the wrong type and 
(previously silently) fell off this function. So yay for catching unicode 
return values!

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D963

To: durin42, #hg-reviewers, pulkit, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D963: hgweb: in protocol adapter, look for bytes instances, not str

2017-10-08 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc23fa3103925: hgweb: in protocol adapter, look for bytes 
instances, not str (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D963?vs=2479&id=2524

REVISION DETAIL
  https://phab.mercurial-scm.org/D963

AFFECTED FILES
  mercurial/hgweb/protocol.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py
+++ b/mercurial/hgweb/protocol.py
@@ -164,7 +164,7 @@
 yield chunk
 
 rsp = wireproto.dispatch(repo, p, cmd)
-if isinstance(rsp, str):
+if isinstance(rsp, bytes):
 req.respond(HTTP_OK, HGTYPE, body=rsp)
 return []
 elif isinstance(rsp, wireproto.streamres):



To: durin42, #hg-reviewers, pulkit, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel