Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Main
Synchronet
Commits
970ccf30
Commit
970ccf30
authored
5 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added comments (docs on use with wget) and a REVISION notice when run.
parent
a1653e04
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/root/qwk.ssjs
+21
-1
21 additions, 1 deletion
web/root/qwk.ssjs
with
21 additions
and
1 deletion
web/root/qwk.ssjs
+
21
−
1
View file @
970ccf30
// $Id$
// vi: tabstop=4
//
Support
QWK packet transfers (uploads of REP packets and downloads of QWK packets)
//
Handle
QWK packet transfers (uploads of REP packets and downloads of QWK packets)
// in the Synchronet Web Server (e.g. using exec/qnet-http.js)
// Although this script is really intended to be used with qnet-http.js, it
// can be used with other http-clients (e.g. for use with other BBS software).
// For example, using GNU Wget (place https:// before <hostname> for HTTPS):
// Upload a REP packet:
// $ wget --auth-no-challenge --post-file=<hub-ID>.qwk --http-user=<username>
// --http-password=<password> <hub-hostname>/qwk.ssjs
// Generate/download a QWK packet:
// $ wget --auth-no-challenge --http-user=<username> --http-password=<password>
// --content-disposition <hub-hostname>/qwk.ssjs
// Confirm successful download of a QWK packet:
// $ wget --auth-no-challenge --http-user=<username> --http-password=<password>
// --post-data= <hub-hostname>/qwk.ssjs?received=<QWK-file-length>
const
REVISION
=
"
$Revision$
"
.
split
(
'
'
)[
1
];
log
(
LOG_INFO
,
"
QWK Packet Handler (qwk.ssjs)
"
+
REVISION
);
const
pack_timeout
=
60
;
// seconds
var
qwkfile
=
system
.
data_dir
+
format
(
"
file/%04u.qwk
"
,
user
.
number
);
...
...
@@ -12,6 +31,7 @@ function get(query)
var
semfile
=
system
.
data_dir
+
format
(
"
pack%04u.now
"
,
user
.
number
);
if
(
!
file_exists
(
qwkfile
))
{
log
(
"
Requesting creation of QWK packet:
"
+
qwkfile
);
file_touch
(
semfile
);
var
start
=
time
();
while
(
file_exists
(
semfile
))
{
...
...
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