Skip to content

Commit

Permalink
scribe: return URL in a JSON response body.
Browse files Browse the repository at this point in the history
This will be used by newer versions of the client instead of the LWURL
cookie.
  • Loading branch information
Benjamin Moody committed Apr 23, 2019
1 parent eeb7c3d commit 6cd5290
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/lw-scribe
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl -T
# file: lw-scribe G. Moody 26 March 2013
# Last revised: 9 November 2015 version 0.64
# Last revised: 23 April 2019 version 0.68
# Receive and save annotations uploaded from a LightWAVE client

$ENV{PATH} = '/usr/local/bin:/usr/bin:/bin';
Expand Down Expand Up @@ -54,7 +54,9 @@ my $patchann = '/usr/local/bin/patchann';
# success200 is executed if log and annotation files are created successfully
sub success200() {
system("ln -sf /ptmp/lw/download.html $wdir/index.html");
print header(-charset=>'utf-8', -cookie=>$lwc, -status => "200 OK");
print header(-type=>'application/json', -charset=>'utf-8',
-cookie=>$lwc, -status => "200 OK");
print "{\"url\": \"$lwurl\"}\n";
exit;
}

Expand Down

0 comments on commit 6cd5290

Please sign in to comment.