Skip to content

Commit

Permalink
Merge branch 'dvzubarev-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dickmao committed Nov 12, 2019
2 parents 6d17064 + 30851dd commit 56466cd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ else
TRAVIS_PULL_REQUEST_SLUG := $(shell git config --global user.name)/$(shell basename `git rev-parse --show-toplevel`)
endif
endif
ifeq ($(TRAVIS),true)
ifeq ($(TRAVIS_PULL_REQUEST_SHA),)
TRAVIS_PULL_REQUEST_SHA := $(shell git rev-parse origin/$(TRAVIS_PULL_REQUEST_BRANCH))
endif
endif

.DEFAULT_GOAL := compile

Expand Down
5 changes: 4 additions & 1 deletion request.el
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ removed from the buffer before it is shown to the parser function.
(request-log 'debug "Run: %s" (mapconcat 'identity command " "))
(setf (request-response--buffer response) buffer)
(process-put proc :request-response response)
(set-process-coding-system proc encoding encoding)
(set-process-coding-system proc 'binary encoding)
(set-process-query-on-exit-flag proc nil)
(set-process-sentinel proc 'request--curl-callback)
(when semaphore
Expand Down Expand Up @@ -1171,6 +1171,9 @@ START-URL is the URL requested."
(request-log 'debug "REQUEST--CURL-CALLBACK buffer = %S" buffer)
(request-log 'debug "REQUEST--CURL-CALLBACK symbol-status = %S"
symbol-status)
(request-log 'trace "REQUEST--CURL-CALLBACK raw-bytes=\n%s"
(when (buffer-live-p buffer)
(with-current-buffer buffer (buffer-string))))
(cond
((and (memq (process-status proc) '(exit signal))
(/= (process-exit-status proc) 0))
Expand Down
10 changes: 10 additions & 0 deletions tests/test-request.el
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,16 @@ See also:
(filename . "data.csv")
(name . "name"))))))

(request-deftest request-post-files/expect-100-header-with-long-body ()
:backends (curl)
(request-testing-with-response-slots
(request-testing-sync
"longtextline"
:type "GET"
:parser 'buffer-string
:headers '(("Expect" . "100-continue")))
(should (equal status-code 200))))


;;; PUT

Expand Down
5 changes: 4 additions & 1 deletion tests/testserver.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from flask import (
Flask, request, session, redirect, abort, jsonify)
Flask, Response, request, session, redirect, abort, jsonify)
from werkzeug.http import HTTP_STATUS_CODES

app = Flask(__name__)
Expand Down Expand Up @@ -32,6 +32,9 @@ def page_report(path):
username=session.get('username'),
))

@app.route('/longtextline', methods=['GET'])
def get_longline():
return Response('1'*18000, mimetype='text/plain')

@app.route('/redirect/<path:path>', methods=all_methods)
def page_redirect(path):
Expand Down

0 comments on commit 56466cd

Please sign in to comment.