Modify ↓
Ticket #1001 (closed defect: fixed)
Opened 7 years ago
Last modified 6 years ago
"htdocs_location" shoudn't be prepended when URL starts with a Slash, or a Scheme
| Reported by: | clynx | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.8.1 |
| Component: | general | Version: | 0.8 |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
When Configuring am header_logo on another Server where the Address starts with http|https the "htdocs_location" Configuration Value if prepended
The URL gets the following for Example:
/trac/http://domain.tdl/logo.png
It would be nice when Trac would check if the Address Starts with a Slash, or a Scheme, and if is exists not to prepend "htdocs_location"
Attachments
Change History
comment:1 Changed 7 years ago by cmlenz
comment:2 Changed 7 years ago by cmlenz
- Milestone set to 0.8.1
- Resolution set to fixed
- Status changed from new to closed
- Version changed from devel to 0.8
Note: See
TracTickets for help on using
tickets.



That should work. At least for your example.
core.py, line 241:
src = env.get_config('header_logo', 'src') src_abs = src[:7] == 'http://' and 1 or 0 if not src[0] == '/' and not src_abs: src = htdocs_location + srcI see how this would not work for https://, which should be fixed.