cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1288 when simulating not-modified --write-out outputs a http 200

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Mon, 07 Oct 2013 12:10:54 +0000

- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -1,4 +1,3 @@
-
 When curl is simulating a "304 Not Modified" after chcking the Last-Modified, if write-out is being used curl outputs a "200", this behaviour is different from what happens if server actually returned a 304. Since the "200" case is simulating a 304 it should probably output a 304.
 
 snipit of curl output below

~~~~

- **status**: open --> open-confirmed
- **assigned_to**: Daniel Stenberg

---
** [bugs:#1288] when simulating not-modified --write-out outputs a http 200**
**Status:** open-confirmed
**Created:** Thu Oct 03, 2013 11:05 PM UTC by Derek Higgins
**Last Updated:** Thu Oct 03, 2013 11:05 PM UTC
**Owner:** Daniel Stenberg
When curl is simulating a "304 Not Modified" after chcking the Last-Modified, if write-out is being used curl outputs a "200", this behaviour is different from what happens if server actually returned a 304. Since the "200" case is simulating a 304 it should probably output a 304.
snipit of curl output below
> GET http://mirrors.nebo.edu/public/fedora/linux/releases/19/Images/i386/Fedora-i386-19-20130627-sda.qcow2 HTTP/1.1
> User-Agent: curl/7.27.0
> Host: mirrors.nebo.edu
> Accept: */*
> Proxy-Connection: Keep-Alive
> If-Modified-Since: Thu, 03 Oct 2013 19:51:39 GMT
>
< HTTP/1.1 200 OK
< Date: Thu, 03 Oct 2013 19:48:14 GMT
< Server: Apache/2.2.15 (CentOS)
< Last-Modified: Thu, 27 Jun 2013 18:25:54 GMT
< ETag: "fe1851-e0a0000-4e026e482d080"
< Accept-Ranges: bytes
< Content-Length: 235536384
< Content-Type: text/plain; charset=UTF-8
< X-Cache: MISS from rhev-i16c-02.mpc.lab.eng.bos.redhat.com
< X-Cache-Lookup: MISS from rhev-i16c-02.mpc.lab.eng.bos.redhat.com:3128
< Via: 1.1 rhev-i16c-02.mpc.lab.eng.bos.redhat.com (squid/3.2.13)
< Connection: keep-alive
<
* The requested document is not new enough
  0 224M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection #0
200
I made an attempt at a fix and attached it but probably missed something, can try again if thats the case.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2013-10-07

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET