Hi all, especially Antonio
I'm using mod_harbour in developing a website and I've run into an issue with downloading binary files through .hrb files on the website. In my case it's .png files that are particularly of interest The earlier version of mod_harbour I was using wasn't able to handle files with embedded null characters as it didn't allow for a length specification.
That problem got solved in the version that was posted a month or so ago, but I think that the new version also contains a bug. When I send a .png file via a .hrb script the file that is sent to the client is one byte larger than the file that exists on the server and that byte is a single space character at the end of the file.
I think that the problem is in out.c which contains contains a section of code (starting at line 134) that reads:
ap_rputs( buffer, r );
ap_rputs( " ", r );
You can see that the second ap_rputs unconditionally adds a space character to the data stream and I'm not sure why it's in this block of code.
I'm using apache on a CentOS 7 server and while there is a prebuilt libharbour.so.3.2.0 in the linux/CentOS 7/ directory I'm not able to build a modified libharbour.so.3.2.0 for two reasons.
Second, the same instruction file contains the line
- modify mod_harbour.c file, line lib_harbour = dlopen( "/var/www/html/libharbour.so.3.2.0", RTLD_LAZY ); by lib_harbour = dlopen( "/usr/lib64/libharbour.so.3.2.0", RTLD_LAZY );
but that line doesn't seem to exist.
I also tried to subscribe to the mod_harbour forum, but that doesn't seem to work either.
Any advice would be appreciated.
Thanks!
Ron