Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
b5739b3a
Commit
b5739b3a
authored
24 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
document time fixes
parent
86d4488c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/ftp.c
+22
-3
22 additions, 3 deletions
lib/ftp.c
lib/getinfo.c
+3
-0
3 additions, 0 deletions
lib/getinfo.c
lib/highlevel.c
+1
-1
1 addition, 1 deletion
lib/highlevel.c
lib/url.c
+3
-0
3 additions, 0 deletions
lib/url.c
with
29 additions
and
4 deletions
lib/ftp.c
+
22
−
3
View file @
b5739b3a
...
...
@@ -659,9 +659,9 @@ CURLcode _ftp(struct connectdata *conn)
}
}
if
(
data
->
bits
.
get_filetime
)
{
if
(
data
->
bits
.
get_filetime
&&
ftp
->
file
)
{
/* we have requested to get the modified-time of the file, this is yet
again a grey area the MDTM is not kosher RFC959 */
again a grey area
as
the MDTM is not kosher RFC959 */
ftpsendf
(
data
->
firstsocket
,
conn
,
"MDTM %s"
,
ftp
->
file
);
nread
=
GetLastResponse
(
data
->
firstsocket
,
buf
,
conn
,
&
ftpcode
);
...
...
@@ -725,10 +725,29 @@ CURLcode _ftp(struct connectdata *conn)
/* get the size from the ascii string: */
filesize
=
atoi
(
buf
+
4
);
sprintf
(
buf
,
"Content-Length: %d
\n
"
,
filesize
);
sprintf
(
buf
,
"Content-Length: %d
\
r\
n
"
,
filesize
);
result
=
client_write
(
data
,
CLIENTWRITE_BOTH
,
buf
,
0
);
if
(
result
)
return
result
;
#ifdef HAVE_STRFTIME
if
(
data
->
bits
.
get_filetime
&&
data
->
progress
.
filetime
)
{
struct
tm
*
tm
;
#ifdef HAVE_LOCALTIME_R
struct
tm
buffer
;
tm
=
(
struct
tm
*
)
localtime_r
(
&
data
->
progress
.
filetime
,
&
buffer
);
#else
tm
=
localtime
(
&
data
->
progress
.
filetime
);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
strftime
(
buf
,
BUFSIZE
-
1
,
"Last-Modified: %a, %d %b %Y %H:%M:%S %Z
\r\n
"
,
tm
);
result
=
client_write
(
data
,
CLIENTWRITE_BOTH
,
buf
,
0
);
if
(
result
)
return
result
;
}
#endif
return
CURLE_OK
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/getinfo.c
+
3
−
0
View file @
b5739b3a
...
...
@@ -84,6 +84,9 @@ CURLcode curl_getinfo(CURL *curl, CURLINFO info, ...)
case
CURLINFO_HTTP_CODE
:
*
param_longp
=
data
->
progress
.
httpcode
;
break
;
case
CURLINFO_FILETIME
:
*
param_longp
=
data
->
progress
.
filetime
;
break
;
case
CURLINFO_HEADER_SIZE
:
*
param_longp
=
data
->
header_size
;
break
;
...
...
This diff is collapsed.
Click to expand it.
lib/highlevel.c
+
1
−
1
View file @
b5739b3a
...
...
@@ -395,7 +395,7 @@ _Transfer(struct connectdata *c_conn)
}
else
if
(
strnequal
(
"Last-Modified:"
,
p
,
strlen
(
"Last-Modified:"
))
&&
data
->
timecondition
)
{
(
data
->
timecondition
||
data
->
bits
.
get_filetime
)
)
{
time_t
secs
=
time
(
NULL
);
timeofdoc
=
curl_getdate
(
p
+
strlen
(
"Last-Modified:"
),
&
secs
);
if
(
data
->
bits
.
get_filetime
)
...
...
This diff is collapsed.
Click to expand it.
lib/url.c
+
3
−
0
View file @
b5739b3a
...
...
@@ -365,6 +365,9 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...)
case
CURLOPT_POST
:
data
->
bits
.
http_post
=
va_arg
(
param
,
long
)
?
TRUE
:
FALSE
;
break
;
case
CURLOPT_FILETIME
:
data
->
bits
.
get_filetime
=
va_arg
(
param
,
long
)
?
TRUE
:
FALSE
;
break
;
case
CURLOPT_FTPLISTONLY
:
data
->
bits
.
ftp_list_only
=
va_arg
(
param
,
long
)
?
TRUE
:
FALSE
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment