You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2013/02/19 01:03:17 UTC

[Bug 54580] New: Redirect error with FQDN and directory seperation

https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

            Bug ID: 54580
           Summary: Redirect error with FQDN and directory seperation
           Product: Apache httpd-2
           Version: 2.2.23
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
          Assignee: bugs@httpd.apache.org
          Reporter: nik@nikolaskallis.com
    Classification: Unclassified

There is a bug in Apache where Apache does not provide the correct redirect
URL.

On my web server, I have the following redirect setting for HTTP requests:

'Redirect / https://nikolaskallis.com'

This works fine when someone visits 'http://nikolaskallis.com', as Apache
redirects the client to 'https://nikolaskallis.com', however, when someone
visits 'http://nikolaskallis.com/contact/', then Apache redirects the client to
'https://nikolaskallis.comcontact/'.

Apache fails to separate the 'contact' directory with the FQDN.


What needs to happen is for Apache to check if there is a forward-slash at the
end of the URL specified in the redirect setting, and if there isn't one, to
then add a forward-slash before the directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory separation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Daniel Shahaf <da...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Redirect error with FQDN    |Redirect error with FQDN
                   |and directory seperation    |and directory separation

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #12 from Nikolas Kallis <ni...@nikolaskallis.com> ---
"Everyone"? Your tripping mate. You just have a tollerance for bugs where as I
don't.

All that has to be done to make Apache check if the redirect URL has a
forward-slash on the end of it when a document or directory is being served
along with the FQDN, and if it doesn't have one, then inserta forward-slash
between the redirect URL and the document\directory being served. That way the
request-response is equivilent. Problem solved!


At the end of the day a bug is a bug - no matter how big or how small, and if
your going to dismiss a bug in a project such as Apache HTTP Server Project
simply because it has no personal effect on you, then you shouldn't be here.
One of Apache's mission statements is 'providing software products for the
public good'.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #23 from Ruediger Pluem <rp...@apache.org> ---
Everything has been said. I agree with Daniel and Eric. Nikolas if you reopen
again we cannot be prevent that. We will just ignore this report and not
feeding the troll any longer. We have no issue keeping this open until you lost
interest and close it in several years during a cleanup just as invalid.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #6 from Nikolas Kallis <ni...@nikolaskallis.com> ---
No, they are not the equivilent.

The HTTPS equivilent of 'http://nikolaskallis.com' is:

'https://nikolaskallis.com'

not

'https://nikolaskallis.com/'

If Apache behaves in the way I specified in my original post, then the problem
will be fixed.

I would do it myself, but I don't have the neccessary programming skills needed
to do it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #7 from Eric Covener <co...@gmail.com> ---
(In reply to comment #6)
> No, they are not the equivilent.
> 
> The HTTPS equivilent of 'http://nikolaskallis.com' is:
> 
> 'https://nikolaskallis.com'
> 
> not
> 
> 'https://nikolaskallis.com/'

For all intents and purposes, those are equivalent URLs.  For example, type
either in your browser and you will request the same "/" from
nikolaskallis.com.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #4 from Nikolas Kallis <ni...@nikolaskallis.com> ---
There shouldn't be a path in the URL as that is not a FQDN.

A trailing forward-slash permanently in the redirect is wrong, because if a
client visits 'http://nikolaskallis.com', then it would take them to
'https://nikolaskallis.com/'. That's incorrect.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #22 from Dominic Benson <do...@thirdlight.com> ---
My suggestion would be to use the RedirectMatch directive instead:

RedirectMatch (.*) https://nikolaskallis.com$1

which will do, I think, exactly what you want.

Changing the behaviour of Redirect doesn't seem right, as it is clearly
described as appending whatever is left of the path to the new URL. As Daniel
suggested, there may very well be people using it who *rely* on concatenating
onto the hostname.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Daniel Shahaf <da...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danielsh@apache.org

--- Comment #27 from Daniel Shahaf <da...@apache.org> ---
Closing.  Nikolas, if you reopen this issue or fail to mind your language, your
bugzilla account will be disabled.  I suggest you follow on the
users@httpd.apache.org mailing list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory separation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Daniel Shahaf <da...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |INVALID

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory separation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Daniel Shahaf <da...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #9 from Eric Covener <co...@gmail.com> ---
> I knew at the time of submitting this bug report that I could have simply
> added a forward-slash on the end of the redirect URL to get directories
> working with aredirect, but then I would not be correctly redirecting people
> who enter my domain using a FQDN with a FQDN.

I think you're still mistaken.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #16 from Erwann Abalea <er...@keynectis.com> ---
(In reply to comment #15)
> A FQDN is a valid URL, and although Apache allows a FQDN a URL redirect, it
> has a bug where it cannot handle FQDN as URL redirect in conjunction with
> files and or directories.
> 
> I really can't think of any other way to explain it.

I'll quote a larger portion of a comment you wrote:

-----
Your suggestion: Add '/' to redirect URL:
People come to my website 'http://nikolaskallis.com'... Cool.
People get redirected to 'https://nikolaskallis.com/'... Drama!
Someone types in 'nikolaskallis.com/foobar/'... Cool.
Someone gets redirected to 'https://nikolaskallis.com/foobar/'... Cool.
-----

Why do you think that a redirection from "http://nikolaskallis.com" to
"https://nikolaskallis.com/" is a drama?

"https://nikolaskallis.com" and "https://nikolaskallis.com/" are equivalent
URLs. Don't trust me, check by yourself (RFC2616, sections 3.2.2 and 3.2.3).
Using either one will give the exact same result.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #11 from Eric Covener <co...@gmail.com> ---
> People get redirected to 'https://nikolaskallis.com/'... Drama!

Only if you choose to call it drama.  Everyone else just calls it "exactly what
happens whan any user types 'https://nikolaskallis.com and hits enter".

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #30 from Daniel Shahaf <da...@apache.org> ---
Closing.  Further discussion should take place on the users@ list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #25 from Eric Covener <co...@gmail.com> ---
> header('Location: example.com');

This is invalid for HTTP for multiple reasons, as is the premise of "entering
via  FQDN".  If you want to discuss further, I'd suggest a mailing list rather
than abusing both bugzilla and the sympathetic people who are trying to explain
this to you.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #17 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Its a drama because I am a perfectionist and don't settle for work arounds.

We should just fix the software so it works correctly. My solution will fix
this bug. I can already visualise a fix for it.

if ($_POST['request'] != $redirecturl) {$redirecturl =
''.$redirecturl.'/'.$_POST['request'].'';}
header('Location: $redirecturl');

OK, so that was an example in PHP and Apache was written in C, but my point is
to fix this would be trivial. If I could code in C, I would have already
submitted a patch for this bug hours ago.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #1 from Nikolas Kallis <ni...@nikolaskallis.com> ---
* (for Apache to check if there is a forward-slash at the end of the URL
specified in the redirect URL WHEN a directory is involved)

Sorry.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Nikolas Kallis <ni...@nikolaskallis.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #24 from Nikolas Kallis <ni...@nikolaskallis.com> ---
I can't code in C, but I can in PHP. I am going to use this piece of PHP code
for the purpose of demonstrating its logic, and how this logic can be applied
to the C code for Apache, to fix this bug:

// Logic
$redirecturl = 'example.com';
$_POST['request'] = '/foobar/';
if ($_POST['request'] != $redirecturl) {$redirecturl =
$redirecturl.$_POST['request'];}
header('Location: $redirecturl');

Which turns out to be:

if (/foobar/ != example.com) {$redirecturl = 'example.com/foobar/';}
// This in turn would make the following:
header('Location: example.com/foobar/');
// Else, if someone is entering via FQDN:
header('Location: example.com');

So there you have it, my problem solved without breaking functionality that
others users.

Thanks for the RedirectMatch demo. I will check it out if this bug doesn't get
fixed any time soon.


Reudiger Pluem, you should learn to shut your mouth. You, along with your
ignorant/arrogant pals just got put in your place by a PHP coder.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #3 from Eric Covener <co...@gmail.com> ---
We could either warn that the configuration looks fishy without a path in the
URL, and/or add a trailing slash permanently, but I am not so thrilled about
either option.  It's going to usually be an invalid configuration but not one
we want to start treating differently when maintenance is applied.

Any other opinions?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Nikolas Kallis <ni...@nikolaskallis.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |---

--- Comment #19 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Reopened. World does not revolve around Eric Covener.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #5 from Eric Covener <co...@gmail.com> ---
(In reply to comment #4)
> There shouldn't be a path in the URL as that is not a FQDN.

The manual says the argument is a URL. 

Yours has a scheme and a hostname.  With no path, / should be assumed.

> 
> A trailing forward-slash permanently in the redirect is wrong, because if a
> client visits 'http://nikolaskallis.com', then it would take them to
> 'https://nikolaskallis.com/'. That's incorrect.

Those are equivalent.  If it's not clear, just add the trailing slash if this
actually blocking your work -- you do not need a fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Nikolas Kallis <ni...@nikolaskallis.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #26 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Eric,

Its not invalid. If someone requests /foobar/ and the redirect URL is
'example.com', then Apache should be putting 'example.com' and '/foobar/'
together, to make 'example.com/foobar/. Instead, Apache leaves out the
forward-slash at the beggining of 'foobar' resulting in 'example.comfoobar'.

How is this not a bug?


Abusing people? I'm not the one who has started drama. I came here and
submitted a bug report and debated, then in typical open source community
fashion, a couple of cock smokers came along and started yelling out 'troll'
just because I did not systematicly agree with everyone.
People like this are pathetic and should not be allowed in open source
projects.

I have no need for the mailing-list. I have submitted my bug. If no one is
going to fix it, then what ever.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #15 from Nikolas Kallis <ni...@nikolaskallis.com> ---
A FQDN is a valid URL, and although Apache allows a FQDN a URL redirect, it has
a bug where it cannot handle FQDN as URL redirect in conjunction with files and
or directories.

I really can't think of any other way to explain it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #13 from Erwann Abalea <er...@keynectis.com> ---
(In reply to comment #10)
[...]
> Your suggestion: Add '/' to redirect URL:
> People get redirected to 'https://nikolaskallis.com/'... Drama!

If given "https://nikolaskallis.com", the browser will make a connection to the
server, and ask to get a ressource, by giving the name of it. This part of the
URL is called "abs_path" in RFC2616, and if it's empty (as in your example),
then it MUST be given as a "/". No drama here.

Whatever you say/do, the HTTP request will still be:
GET / HTTP/1.1
Server: nikolaskallis.com

This MAY be different if you consider this:
Redirect / https://nikolaskallis.com/blob

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #10 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Its simple:

I redirect to 'https://nikolaskallis.com'... Cool

People come to my website 'http://nikolaskallis.com'... Cool.

People get redirected to 'https://nikolaskallis.com'... Cool.

Someone types in 'https://nikolaskallis.com/foobar/'... Cool.

Someone gets redirected to 'https://nikolaskallis.comfoobar/'... Drama!


Your suggestion: Add '/' to redirect URL:

People come to my website 'http://nikolaskallis.com'... Cool.

People get redirected to 'https://nikolaskallis.com/'... Drama!

Someone types in 'nikolaskallis.com/foobar/'... Cool.

Someone gets redirected to 'https://nikolaskallis.com/foobar/'... Cool.


So, as you can see. What you suggested still produces a drama, however, should
my behavior instructions described in the first three posts of this bug report
be implimented into Apache, then this bug will be fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #2 from Nikolas Kallis <ni...@nikolaskallis.com> ---
The process should apply to documents also.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory separation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

nik@nikolaskallis.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|danielsh@apache.org         |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Nikolas Kallis <ni...@nikolaskallis.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #21 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Daniel Gruno,

Yes, our documentation does say "Additional path information beyond the matched
URL-Path will be appended to the target URL". It is this action which is the
damn problem I have been talking about this whole time, have you not understood
anything that I have said?

As for your question about "http://foo/bar to http://foo.bar": See my example
of logic in comment 17. The logic in that that solution of mine would solve the
bug in Apache.

Also, my strive to get this bug fixed has nothing to do with what you call
"narcissistic tendencies", its called quality control.

Reopening due to closure by ignorance.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #18 from Eric Covener <co...@gmail.com> ---
Closing as WONTFIX, not adding extra validation or fixups to the 2nd parm of
the Redirect directive because it only helps when every redirect except / is
catastrophically broken by the mis-configuration so it will already be pretty
clear to the user already.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

Daniel Gruno <hu...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #20 from Daniel Gruno <hu...@apache.org> ---
Closing as INVALID, as this is a PEBKAC.
Our documentation clearly states; "Additional path information beyond the
matched URL-Path will be appended to the target URL", thus it is clear, that if
you do not add a trailing slash, you'll get the "error" that you are getting.
How else would I be able to redirect http://foo/bar to http://foo.bar ? Your
"fix" would change that to http://foo/.bar which is wrong in my fictitious use
case, or would you have us implement a mind reading module that does exactly
what you think you want it to do?

Whether your narcissistic tendencies compel you to omit the trailing slash or
not is none of our concern. Read the docs, act accordingly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #29 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Daniel Shahaf, your a discrace to the open source movement.


Erwann Abalea,

No, I didn't fail to read documentation. I expected Apache to do something that
it should have done, but didn't.

Sorry. The PHP pseudocodes were not meant to be working code. They were kinda a
hybrid example of what I was visualising in the only programming logic I
understand.

If Apache just checked for a FQDN in the redirect setting when anything other
than 'GET /' was being requested, then the bug would be fixed.


This discussion has become majorly draining.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #28 from Erwann Abalea <er...@keynectis.com> ---
(In reply to comment #26)
> Eric,
> 
> Its not invalid. If someone requests /foobar/ and the redirect URL is
> 'example.com', then Apache should be putting 'example.com' and '/foobar/'
> together, to make 'example.com/foobar/. Instead, Apache leaves out the
> forward-slash at the beggining of 'foobar' resulting in 'example.comfoobar'.
> 
> How is this not a bug?

It's the intended purpose. But you fail to read the documentation and normative
documents.

The directive:
Redirect / http://example.com
is to be read like this: if the request starts with a '/' (did you notice the
first argument? you don't mention it, but it's here), then strip this leading
'/' and add what remains to the end of "http://example.com".

With such a directive and your example (/foobar/), then yes, the result will be
a redirect to "http://example.comfoobar/" which probably won't work (it may
work, depending on your network configuration).

If what you want is redirect everything from "http://nikolaskallis.com" to
"https://nikolaskallis.com", then you can use either one of (probably non
exhaustive list):

Redirect / https://nikolaskallis.com/
RedirectMatch (.*) https://nikolaskallis.com$1
RewriteRule ^(.*)$ https://nikolaskallis.com$1 [redirect=301]

Your first PHP pseudocode didn't work (see comment 20). Your second PHP
pseudocode don't allow to perform the following kind of redirection:
Redirect /documents/lang/en/ /lang.en.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #14 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Erwann, what you say is correct, however, you have missed the point entirely.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54580] Redirect error with FQDN and directory seperation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54580

--- Comment #8 from Nikolas Kallis <ni...@nikolaskallis.com> ---
Work arounds are to fix the intent of the purpose, but do you think they are
professional? I don't. What you suggested is a work around.

I knew at the time of submitting this bug report that I could have simply added
a forward-slash on the end of the redirect URL to get directories working with
aredirect, but then I would not be correctly redirecting people who enter my
domain using a FQDN with a FQDN.

I find the work around disgusting. Its a presentation/logic thing that
irritates the hell out of me.


By the way, because of a stupid design in this bug tracker software where after
you make a post it takes you to another bug page, I accidently posted a message
to another page, that was meant for here - for you, Eric Covener:

You said "With no path, / should be assumed."

No it shouldn't. People generally don't visit a website by typing I.E
'google.com/' - they type 'google.com'.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org