pyocd / cmsis-pack-manager

A Rust and Python module for handling CMSIS Pack files
Apache License 2.0
25 stars 33 forks source link

Investigate invalid PDSC downloads #154

Open flit opened 3 years ago

flit commented 3 years ago

(Reported by @rapgenic in #121.)

In the cmsis-pack-manager local PDSC repository, a few .pdsc files are definitely not PDSC XML. Instead they contain strange html/js code. Is this a result of a missed redirection/missing resource, or is it simply invalid configuration on the part of the silicon vendors?

List of questionable files:

rapgenic commented 3 years ago

Also, when updating the index, a few warnings are reported (which I originally ignored, being them warnings), like (note that there are many others and a lot of them are related to functioning packs which probably contain little errors):

Nov 23 17:13:27.339 WARN tried to parse element "package" from element "html"
Nov 23 17:13:27.454 WARN the XML is invalid, an element was wrongly closed
Nov 23 17:13:27.464 WARN Only Comment, CDATA and DOCTYPE nodes can start with a '!'

Which suggest that the library is recognising those files as problematic.

flit commented 2 years ago

Most of the listed PDSCs are actually returning 404 Not Found responses. Because of #162 and #155, the html content of the error message sent by the server gets written to the .pdsc file.