#26 CharsetUtils.getCharset() returns sometimes null

open
Rogan Dawes
5
2008-04-07
2008-04-07
jpstotz
No

On certain CSS files the utility method org.owasp.webscarab.util.CharsetUtils.getCharset(byte[]) returns null as charset which usually raises an exeption in the using code parts.

Example:
Enable "intercept responses" in WebScarab and load http://www.mediawiki.org/skins-1.5/monobook/main.css through WebScarab.

at java.lang.String.<init>(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at org.owasp.webscarab.ui.swing.editors.TextPanel.setBytes(TextPanel.java:158)
at org.owasp.webscarab.ui.swing.ContentPanel.updatePanel(ContentPanel.java:209)

Jan

Discussion

  • jpstotz
    jpstotz
    2008-04-07

    • summary: org.owasp.webscarab.util.CharsetUtils.getCharset() --> CharsetUtils.getCharset() returns sometimes null