Skip to content

Commit

Permalink
[#59] Zipping .woff2 returns incorrect data to the web browser/client
Browse files Browse the repository at this point in the history
It turns out that the code to write out a binary file after it was read
was missing `set $x=0`, otherwise GT.M/YottaDB by default will add a
LF to the file at the end. This caused the following steps of gzipping
the binary file to effectively fail.

No tests, as I can't think of an easy test to test this within the
framework used in the Web Server.

Version bumped to 1.1.4.
  • Loading branch information
shabiel committed Jul 25, 2022
1 parent 7e6f607 commit d57aa6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ in your shell. If you see anything other than a blank, you are ready to go.

On the linux terminal, Use cURL to download the bootstrap routine.

curl -L https://github.com/shabiel/M-Web-Server/releases/download/1.1.3/webinit.rsa > /tmp/webinit.rsa
curl -L https://github.com/shabiel/M-Web-Server/releases/download/1.1.4/webinit.rsa > /tmp/webinit.rsa

Run GT.M/YottaDB using `$gtm_dist/mumps -dir` or `$ydb_dist/yottadb -dir`.

Expand Down Expand Up @@ -176,7 +176,7 @@ Then download the bootstrap file as follows:

C:\Users\VISTAEXPERTISE>cd %temp%

C:\Users\VISTAE~1\AppData\Local\Temp>curl -k -L -O https://github.com/shabiel/M-Web-Server/releases/download/1.1.3/webinit.rsa
C:\Users\VISTAE~1\AppData\Local\Temp>curl -k -L -O https://github.com/shabiel/M-Web-Server/releases/download/1.1.4/webinit.rsa

Open the Cache Terminal from the Cache Cube, or use another method to get in. Read the routine archive in. Cache will complain that it doesn't recoginze GT.M's format. Ignore this error.

Expand Down Expand Up @@ -265,7 +265,7 @@ Open the Linux Terminal.

Use cURL to download the bootstrap routine.

curl -L https://github.com/shabiel/M-Web-Server/releases/download/1.1.3/webinit.rsa > /tmp/webinit.rsa
curl -L https://github.com/shabiel/M-Web-Server/releases/download/1.1.4/webinit.rsa > /tmp/webinit.rsa

Open the Cache Terminal using `csession CACHE`, and switch to the appropriate
namespace.
Expand Down
1 change: 1 addition & 0 deletions src/_webrsp.m
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ D W("Content-Length: "_SIZE_$C(13,10)_$C(13,10))
. I $D(@HTTPRSP)>1 S I=0 F S I=$O(@HTTPRSP@(I)) Q:'I W @HTTPRSP@(I)
;
; Close
s $x=0 ; needed to prevent adding an EOF to the file
c file
;
O "D":(shell="/bin/sh":command="gzip "_file:parse):0:"pipe"
Expand Down
2 changes: 1 addition & 1 deletion src/webinit.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
webinit ; OSE/SMH - Initialize Web Server;2019-11-14 2:36 PM
;;1.1.3;MASH WEB SERVER/WEB SERVICES
;;1.1.4;MASH WEB SERVER/WEB SERVICES
;
; Map %web on Cache
DO CACHEMAP("%web")
Expand Down

0 comments on commit d57aa6e

Please sign in to comment.