progress: prevent resetting t_starttransfer

Prevent `Curl_pgrsTime` from modifying `t_starttransfer` when invoked
with `TIMER_STARTTRANSFER` more than once during a single request.

When a redirect occurs, this is considered a new request and
`t_starttransfer` can be updated to reflect the `t_starttransfer` time
of the redirect request.

Closes #1616

Bug: https://github.com/curl/curl/pull/1602#issuecomment-310267370
This commit is contained in:
Ryan Winograd 2017-06-26 11:51:05 -05:00 committed by Daniel Stenberg
parent ef2a9f22cc
commit f8f040e659
5 changed files with 142 additions and 2 deletions

26
tests/data/test1399 Normal file
View file

@ -0,0 +1,26 @@
<testcase>
<info>
<keywords>
unittest
Curl_pgrsTime
</keywords>
</info>
#
# Client-side
<client>
<server>
none
</server>
<features>
unittest
</features>
<name>
Curl_pgrsTime unit tests
</name>
<tool>
unit1399
</tool>
</client>
</testcase>