Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpage URL truncated after redirect #396

Closed
OwnerOfThisIsle opened this issue Sep 10, 2020 · 2 comments
Closed

Webpage URL truncated after redirect #396

OwnerOfThisIsle opened this issue Sep 10, 2020 · 2 comments
Assignees
Labels
bug Something isn't working priority-low
Milestone

Comments

@OwnerOfThisIsle
Copy link

I observed the following problem with HTMLDOC 1.9.10

I do the following call from command line:
c:/htmldoc/htmldoc --embedfonts --compression=9 --left 1cm --top 1cm --bottom 1cm --headfootsize 7 --format pdf14 --header t.. --footer D./ --webpage "http://localhost/simon/modules/max/reports/generaldata.php?pat_id=173&beg_date=Aug+22+2012+12:56PM&end_date=Sep++9+2020+12:31PM&beg_date_p=Aug+22+2012+12:56PM&end_date_p=Sep++9+2020+12:31PM&rtm=0&room=141&title=Stammdaten&logpath=D%3A%5CApps%5CApache%5Csimon%5Cmodules%2Fmax%2Flog_oscar%2F&mode=oscar&documentID=9999_0000000964_0000000001&showuserlist=1" -f "D:\Apps\Apache\simon\modules/max/exchange_oscar/\TMP1_XXX_CCU_115$51155b_test_Blood-Products_abc_115$51155c_Stammdaten_964_16_0000000001.pdf"

My webserver (apache) redirects the http request to https. The access.log has this two lines:
127.0.0.1 - - [10/Sep/2020:08:18:40 +0200] "GET /simon/modules/max/reports/generaldata.php?pat_id=173&beg_date=Aug+22+2012+12:56PM&end_date=Sep+9+2020+12:31PM&beg_date_p=Aug+22+2012+12:56PM&end_date_p=Sep+9+2020+12:31PM&rtm=0&room=141&title=Stammdaten&logpath=D:\\Apps\\Apache\\simon\\modules/max/log_oscar/&mode=oscar&documentID=9999_0000000964_0000000001&showuserlist=1 HTTP/1.1" 301 588
127.0.0.1 - - [10/Sep/2020:08:18:40 +0200] "GET /simon/modules/max/reports/generaldata.php?pat_id=173&beg_date=Aug+22+2012+12:56PM&end_date=Sep+9+2020+12:31PM&beg_date_p=Aug+22+2012+12:56PM&end_date_p=Sep+9+2020+12:31PM&rtm=0&room=141&title=Stammdaten&logpath=D:\\Apps\\Apache\\simon\\modul HTTP/1.1" 200 62

Please note:
The second line is truncated, because of that the PHP Script on the Webserver will fail with an error, the error message will be written into the PDF.

@michaelrsweet michaelrsweet changed the title Webpage URL korrupted after redirect Webpage URL truncated after redirect Sep 10, 2020
@michaelrsweet michaelrsweet self-assigned this Sep 10, 2020
@michaelrsweet michaelrsweet added bug Something isn't working priority-low labels Sep 10, 2020
@michaelrsweet michaelrsweet added this to the Stable milestone Sep 10, 2020
@michaelrsweet
Copy link
Owner

The current HTTP client code supports a maximum redirect URL length of 255 characters (side effect of the CUPS code I'm using), which causes the URL to be truncated.

I should be able to update the HTTP code to the latest CUPS 2.3.x bits which remove the 255 character limit.

michaelrsweet added a commit that referenced this issue Dec 6, 2020
@michaelrsweet
Copy link
Owner

[master 41cca81] Update the embedded (CUPS) HTTP library to the latest version to fix the truncated redirection URL problem (Issue #396)
[master 3757b86] Fix build error on Windows (Issue #396)
[master 49dfe28] Fix compile issues on Linux (Issue #396)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low
Projects
None yet
Development

No branches or pull requests

2 participants