Menu

#4 String index out of range: -1

v1.0 (example)
closed-fixed
None
5
2021-07-17
2003-10-07
Anonymous
No

Hello,
I really appreciate your work on jspider. I reported this small bug
in order to improve this nice project.

When parsing broken robots.txt like e.g.
User-Agent:
Disallow:

it leads to

java.lang.StringIndexOutOfBoundsException: String index out
of range: -1
at java.lang.String.substring(String.java:1480)
at java.lang.String.substring(String.java:1447)
at
net.javacoding.jspider.core.util.html.RobotsTXTLineSet.findUserAgent(Unknown
Source)

Regards
Vojtech

Discussion

  • Günther Van Roey

    • assigned_to: nobody --> vanrogu
    • status: open --> closed
     
  • Günther Van Roey

    Logged In: YES
    user_id=363928

    Bug is fixed.

    JUnit testcase for this one.

     
  • EJP

    EJP - 2021-07-17
    • Description has changed:

    Diff:

    
    
    • status: closed --> closed-fixed
    • Group: --> v1.0 (example)
     

Log in to post a comment.