Traceback from MIMEDocument>>guessTypeFromName

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Traceback from MIMEDocument>>guessTypeFromName

tfleig
In Pharo1.1 update #11411,

evaluating

    MIMEDocument guessTypeFromName: 'x.css'

produces the attached traceback.

Changing

    MIMEDocument>>guessTypeFromName: url
            "guesses a content type from the url"
            ^MIMEType forFileNameReturnSingleMimeTypeOrDefault: url asString asURI

to 

    MIMEDocument>>guessTypeFromName: url
            "guesses a content type from the url"
            ^MIMEType forFileNameReturnSingleMimeTypeOrDefault: url asString

(removing asURI), makes it work as expected, answering 'css'.


Is this a bug? Is my fix appropriate?

I've made this change in my image. What is the process to get this addressed in the product?

Thanks,
TF


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

tracebacktxt.txt (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Traceback from MIMEDocument>>guessTypeFromName

Philippe Marschall-2
On 10/26/2010 05:32 PM, Tony Fleig wrote:

> In Pharo1.1 update #11411,
>
> evaluating
>
>     MIMEDocument guessTypeFromName: 'x.css'
>
> produces the attached traceback.
>
> Changing
>
>     MIMEDocument>>guessTypeFromName: url
>             "guesses a content type from the url"
>             ^MIMEType forFileNameReturnSingleMimeTypeOrDefault: url
> asString asURI
>
> to
>
>     MIMEDocument>>guessTypeFromName: url
>             "guesses a content type from the url"
>             ^MIMEType forFileNameReturnSingleMimeTypeOrDefault: url asString
>
> (removing asURI), makes it work as expected, answering 'css'.
>
>
> Is this a bug?

Yes it is, see:
http://code.google.com/p/pharo/issues/detail?id=2797

Cheers
Philippe


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Traceback from MIMEDocument>>guessTypeFromName

tfleig
Ah. Thank you.

I see I should peruse the issues list for problems like this before trying to figure it out myself.

Regards,
TF

On Tue, Oct 26, 2010 at 8:50 AM, Philippe Marschall <[hidden email]> wrote:
On 10/26/2010 05:32 PM, Tony Fleig wrote:
> In Pharo1.1 update #11411,
>
> evaluating
>
>     MIMEDocument guessTypeFromName: 'x.css'
>
> produces the attached traceback.
>
> Changing
>
>     MIMEDocument>>guessTypeFromName: url
>             "guesses a content type from the url"
>             ^MIMEType forFileNameReturnSingleMimeTypeOrDefault: url
> asString asURI
>
> to
>
>     MIMEDocument>>guessTypeFromName: url
>             "guesses a content type from the url"
>             ^MIMEType forFileNameReturnSingleMimeTypeOrDefault: url asString
>
> (removing asURI), makes it work as expected, answering 'css'.
>
>
> Is this a bug?

Yes it is, see:
http://code.google.com/p/pharo/issues/detail?id=2797

Cheers
Philippe


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project