Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eget
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eget
Commits
94d3de4c
Commit
94d3de4c
authored
Dec 28, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add Last-Modified warning for curl backend
parent
c3537f8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
eget
eget
+15
-0
No files found.
eget
View file @
94d3de4c
...
@@ -1246,6 +1246,18 @@ url_scat()
...
@@ -1246,6 +1246,18 @@ url_scat()
download_with_mirroring __curl
"
$URL
"
--
output
-
download_with_mirroring __curl
"
$URL
"
--
output
-
}
}
# Helper to check Last-Modified for curl timestamping
__curl_check_timestamp
()
{
local
URL
=
"
$1
"
[
-
n
"
$quiet
"
]
&&
return
0
# Skip check in quiet mode
local
last_modified
=
"
$(
url_get_header
"
$URL
"
"Last-Modified"
)
"
if
[
-
z
"
$last_modified
"
]
;
then
info
"Warning: Server did not provide Last-Modified header, time-stamps turned off"
fi
}
# download to default name of to $2
# download to default name of to $2
url_sget
()
url_sget
()
{
{
...
@@ -1256,6 +1268,7 @@ url_sget()
...
@@ -1256,6 +1268,7 @@ url_sget()
return
return
elif
[
-
n
"
$2
"
]
;
then
elif
[
-
n
"
$2
"
]
;
then
if
[
-
n
"
$CURLTIMESTAMPING
"
]
&&
[
-
f
"
$2
"
]
;
then
if
[
-
n
"
$CURLTIMESTAMPING
"
]
&&
[
-
f
"
$2
"
]
;
then
__curl_check_timestamp
"
$URL
"
download_with_mirroring __curl
"
$URL
"
-
z
"
$2
"
--
output
"
$2
"
download_with_mirroring __curl
"
$URL
"
-
z
"
$2
"
--
output
"
$2
"
else
else
download_with_mirroring __curl
"
$URL
"
--
output
"
$2
"
download_with_mirroring __curl
"
$URL
"
--
output
"
$2
"
...
@@ -1266,6 +1279,7 @@ url_sget()
...
@@ -1266,6 +1279,7 @@ url_sget()
local
FILENAME
=
"
$(
url_get_filename
"
$URL
"
)
"
local
FILENAME
=
"
$(
url_get_filename
"
$URL
"
)
"
if
[
-
n
"
$FILENAME
"
]
;
then
if
[
-
n
"
$FILENAME
"
]
;
then
if
[
-
n
"
$CURLTIMESTAMPING
"
]
&&
[
-
f
"
$FILENAME
"
]
;
then
if
[
-
n
"
$CURLTIMESTAMPING
"
]
&&
[
-
f
"
$FILENAME
"
]
;
then
__curl_check_timestamp
"
$URL
"
download_with_mirroring __curl
"
$URL
"
-
z
"
$FILENAME
"
$CURLNAMEOPTIONS
--
output
"
$FILENAME
"
download_with_mirroring __curl
"
$URL
"
-
z
"
$FILENAME
"
$CURLNAMEOPTIONS
--
output
"
$FILENAME
"
else
else
download_with_mirroring __curl
"
$URL
"
$CURLNAMEOPTIONS
--
output
"
$FILENAME
"
download_with_mirroring __curl
"
$URL
"
$CURLNAMEOPTIONS
--
output
"
$FILENAME
"
...
@@ -1277,6 +1291,7 @@ url_sget()
...
@@ -1277,6 +1291,7 @@ url_sget()
# Need to get filename first to use -z
# Need to get filename first to use -z
FILENAME
=
"
$(
basename
"
$URL
"
)
"
FILENAME
=
"
$(
basename
"
$URL
"
)
"
if
[
-
f
"
$FILENAME
"
]
;
then
if
[
-
f
"
$FILENAME
"
]
;
then
__curl_check_timestamp
"
$URL
"
download_with_mirroring __curl
"
$URL
"
-
z
"
$FILENAME
"
$CURLFILENAMEOPTIONS
download_with_mirroring __curl
"
$URL
"
-
z
"
$FILENAME
"
$CURLFILENAMEOPTIONS
else
else
download_with_mirroring __curl
"
$URL
"
$CURLFILENAMEOPTIONS
download_with_mirroring __curl
"
$URL
"
$CURLFILENAMEOPTIONS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment