Re: [dspace-tech] invalid 301 Location: header

2017-02-07 Thread George Kozak
Thanks, Tim:
Yes, we moved from JSPUI to XMLUI a couple of years ago, but, of course,
people have book marked the old JSPUI paths to the bitstreams.
I guess I will deal with this on a one-by-one basis.  It only happens when
there are filename with spaces.
Thanks, again.
***
George Kozak
Digital Library Specialist
Cornell University Library - IT
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924 <(607)%20255-8924>
g...@cornell.edu

On Tue, Feb 7, 2017 at 2:29 PM, Tim Donohue  wrote:

> Hi George,
>
> I think this issue is related to some (old) code that tried to keep the
> XMLUI "compatible" with JSPUI-style URLs (to ease migration between the two
> UIs). Specifically, these redirects of JSPUI-style paths to the
> corresponding XMLUI ones:
> https://github.com/DSpace/DSpace/blob/master/dspace-
> xmlui/src/main/webapp/sitemap.xmap#L362
>
> It sounds like it might be a bug here, but it's likely very infrequently
> occurring. The XMLUI itself doesn't use URLs to bitstreams that look like
> this: "/bitstream/[prefix]/[suffix]/[sequence]/[filename]" (That's a
> JSPUI URL pattern).  Instead, the XMLUI uses URLs to bitstreams that look
> like this: "/bitstream/[prefix]/[suffix]/[filename]?sequence=[sequence]".
>
> So, long story short, there may be a way to clean this up and fix it for
> filenames with spaces. However, it likely won't be encountered unless you
> move from JSPUI to XMLUI, and your users have bookmarked or saved the old
> URLs (and one or more includes filenames with spaces).
>
> - Tim
>
> On Mon, Feb 6, 2017 at 1:23 PM George Kozak  wrote:
>
> We are running DSpace 5.5 (XMLUI with modified MIrage 2 theme).
> I received an email today from someone on our campus that is running a link
> checker.  They got the following error when trying to download one of our
> DSpace PDFs: "invalid 301 Location: header"
>
> The URL that they used was:
> curl -v https://ecommons.cornell.edu/bitstream/1813/2094/1/
> Stanton%20Agr%20Econ%20History%20online.pdf
>
> The PDF in question had spaces which was causing the error.  We have
> always urged our users not to put spaces or special characters in the
> filenames that they upload, because we know that this causes some problems
> with certain browsers, but this was the first time that someone told us
> that these filenames were causing errors with link checkers.
>
> The person who contacted me believes this is a bug in DSpace, but I'm not
> so sure.  I think this is pretty much how things have been since
> DSpace1.0.  Should this be considered a bug?
>
> Does anyone know of a way to force users to submit filenames without
> spaces or special characters?
> --
> ***
> George Kozak
> Digital Library Specialist
> Cornell University Library - IT
> 218 Olin Library
> Cornell University
> Ithaca, NY 14853
> 607-255-8924 <(607)%20255-8924>
> g...@cornell.edu
>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> Tim Donohue
> Technical Lead for DSpace & DSpaceDirect
> DuraSpace.org | DSpace.org | DSpaceDirect.org
>
>


-- 
***
George Kozak
Digital Library Specialist
Cornell University Library - IT
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924
g...@cornell.edu

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] invalid 301 Location: header

2017-02-07 Thread Tim Donohue
Hi George,

I think this issue is related to some (old) code that tried to keep the
XMLUI "compatible" with JSPUI-style URLs (to ease migration between the two
UIs). Specifically, these redirects of JSPUI-style paths to the
corresponding XMLUI ones:
https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/sitemap.xmap#L362

It sounds like it might be a bug here, but it's likely very infrequently
occurring. The XMLUI itself doesn't use URLs to bitstreams that look like
this: "/bitstream/[prefix]/[suffix]/[sequence]/[filename]" (That's a JSPUI
URL pattern).  Instead, the XMLUI uses URLs to bitstreams that look like
this: "/bitstream/[prefix]/[suffix]/[filename]?sequence=[sequence]".

So, long story short, there may be a way to clean this up and fix it for
filenames with spaces. However, it likely won't be encountered unless you
move from JSPUI to XMLUI, and your users have bookmarked or saved the old
URLs (and one or more includes filenames with spaces).

- Tim

On Mon, Feb 6, 2017 at 1:23 PM George Kozak  wrote:

We are running DSpace 5.5 (XMLUI with modified MIrage 2 theme).
I received an email today from someone on our campus that is running a link
checker.  They got the following error when trying to download one of our
DSpace PDFs: "invalid 301 Location: header"

The URL that they used was:
curl -v
https://ecommons.cornell.edu/bitstream/1813/2094/1/Stanton%20Agr%20Econ%20History%20online.pdf

The PDF in question had spaces which was causing the error.  We have always
urged our users not to put spaces or special characters in the filenames
that they upload, because we know that this causes some problems with
certain browsers, but this was the first time that someone told us that
these filenames were causing errors with link checkers.

The person who contacted me believes this is a bug in DSpace, but I'm not
so sure.  I think this is pretty much how things have been since
DSpace1.0.  Should this be considered a bug?

Does anyone know of a way to force users to submit filenames without spaces
or special characters?
-- 
***
George Kozak
Digital Library Specialist
Cornell University Library - IT
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924 <(607)%20255-8924>
g...@cornell.edu

-- 
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 

Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] invalid 301 Location: header

2017-02-06 Thread George Kozak
We are running DSpace 5.5 (XMLUI with modified MIrage 2 theme).
I received an email today from someone on our campus that is running a link
checker.  They got the following error when trying to download one of our
DSpace PDFs: "invalid 301 Location: header"

The URL that they used was:
curl -v
https://ecommons.cornell.edu/bitstream/1813/2094/1/Stanton%20Agr%20Econ%20History%20online.pdf

The PDF in question had spaces which was causing the error.  We have always
urged our users not to put spaces or special characters in the filenames
that they upload, because we know that this causes some problems with
certain browsers, but this was the first time that someone told us that
these filenames were causing errors with link checkers.

The person who contacted me believes this is a bug in DSpace, but I'm not
so sure.  I think this is pretty much how things have been since
DSpace1.0.  Should this be considered a bug?

Does anyone know of a way to force users to submit filenames without spaces
or special characters?
-- 
***
George Kozak
Digital Library Specialist
Cornell University Library - IT
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924
g...@cornell.edu

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.