Edgewall Software
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

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 + src

I see how this would not work for https://, which should be fixed.

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

Fixed in [1257], ported to 0.8 stable in [1258].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.