WifiNiNa WifiWebServer Issue with SVG

Mkr 1010
WifiNina
WifiWebServer GitHub - khoih-prog/WiFiWebServer: This is simple yet complete WebServer library for AVR, Teensy, SAM DUE, SAMD, STM32, etc. boards running WiFi modules/shields (WiFiNINA U-Blox W101, W102, etc.). The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32.

Using the mkr 1010 and wifiwebserver, i have a set of code that is not translating well with google chrome. Utilizing the svg example in the wifiwebserver above I am running into what looks like a buffer issue when returning a long svg image

void drawLogo () {
 String out;
  out.reserve(4000);

  out += F("<svg width=\"34\" height=\"25\" viewBox=\"0 0 34 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">");  
  out += F("<path d=\"M8.72676 3.42225C8.78977 3.33633 8.85063 3.25326 8.9092 3.17307H6.62577C5.73029 4.39606 4.6919 5.82384 3.73828 7.1886H5.99208C6.97791 5.80379 7.98179 4.43616 8.72676 3.42225Z\" fill=\"#27B3E0\"/>");
  out += F("<path d=\"M11.1758 3.1731C9.99572 1.52996 8.98574 0.123423 8.90895 4.18698e-05C8.81315 0.20616 7.8547 1.49657 6.62598 3.1731H8.90939H11.1758\" fill=\"#68BCE9\"/>");
  out += F("<path d=\"M9.60159 4.13675C10.3175 5.13491 11.1289 6.26482 11.8286 7.24292H14.09C13.3084 6.14309 12.1803 4.57211 11.1757 3.17297H8.90918C9.1121 3.45509 9.34181 3.77587 9.60159 4.13675\" fill=\"#27B3E0\"/>");
  out += F("<path d=\"M3.91649 23.3067C5.36333 24.2229 7.00637 24.6444 8.64404 24.6444C10.4146 24.6444 12.1751 24.147 13.6756 23.2531H3.83691C3.86388 23.2701 3.88927 23.2897 3.91649 23.3067\" fill=\"#00598E\"/>");
  out += F("<path d=\"M16.8507 20.0382H14.6438C14.3219 20.4369 13.9784 20.7676 13.6566 21.0316C12.2851 22.1571 10.4579 22.8026 8.6435 22.8026C7.28198 22.8026 5.98779 22.4385 4.90098 21.7504C3.84963 21.085 3.09646 20.2129 2.60092 19.2367H0.592773C1.19672 20.825 2.26941 22.2358 3.83643 23.252H13.675C14.9931 22.4678 16.1111 21.3784 16.8507 20.0382\" fill=\"#00649E\"/>");
  out += F("<path d=\"M1.87935 15.2212H0.0254722C-0.0727224 16.5984 0.112259 17.9729 0.593046 19.2373H2.60121C1.9732 18 1.76011 16.593 1.87935 15.2212Z\" fill=\"#007ABD\"/>");
  out += F("<path d=\"M2.63224 12.3664C2.77397 12.0608 2.99771 11.6639 3.278 11.2048H1.15679C1.08406 11.3417 1.01672 11.4745 0.961958 11.592C0.428752 12.7494 0.113475 13.9856 0.0253906 15.2205H1.87917C1.96559 14.2248 2.22625 13.2486 2.63224 12.3664\" fill=\"#008FCA\"/>");
  out += F("<path d=\"M5.99231 7.18944H3.73845C2.65487 8.74183 1.68417 10.2098 1.15723 11.2048H3.2785C3.95323 10.1014 4.96221 8.63628 5.99231 7.18944Z\" fill=\"#00A7D8\"/>");
  out += F("<path d=\"M9.8873 18.675C8.86483 18.675 8.12848 18.5798 7.47419 18.43C7.33778 18.4034 7.2151 18.3067 7.2151 18.1569V17.1752C7.2151 17.0253 7.33778 16.9161 7.47419 16.9161C7.48777 16.9161 7.48777 16.9161 7.50136 16.9161C8.04669 16.9847 9.41017 17.0533 9.91461 17.0533C11.1281 17.0533 11.4961 16.6164 11.4961 15.8265C11.4961 15.2944 11.2371 15.0213 10.3373 14.4891L8.53755 13.4121C7.26958 12.6629 6.92871 11.8717 6.92871 10.9179C6.92871 9.41806 7.80133 8.32711 10.3373 8.32711C11.2371 8.32711 12.4914 8.46296 12.955 8.57219C13.0913 8.6002 13.2004 8.69543 13.2004 8.83128V9.84099C13.2004 9.97684 13.105 10.0861 12.9686 10.0861C12.955 10.0861 12.955 10.0861 12.9414 10.0861C12.0415 10.0034 11.1417 9.95024 10.2555 9.95024C9.24646 9.95024 8.8238 10.3045 8.8238 10.9179C8.8238 11.3675 9.05557 11.6406 9.94192 12.1307L11.5779 13.0438C13.0777 13.8757 13.4732 14.7482 13.4732 15.8265C13.4732 17.2032 12.6141 18.675 9.8873 18.675Z\" fill=\"#00598E\"/>");
  out += F("<path d=\"M16.5043 18.5671H15.1545C15.0045 18.5671 14.8818 18.444 14.8818 18.2942V8.69591C14.8818 8.54613 15.0045 8.43695 15.1545 8.43695H16.5043C16.6542 8.43695 16.7769 8.54613 16.7769 8.69591V18.2942C16.7769 18.444 16.6542 18.5671 16.5043 18.5671Z\" fill=\"#00598E\"/>");
  out += F("<path d=\"M23.727 11.4766C23.727 10.331 23.0452 9.89549 21.6814 9.89549C21.3951 9.89549 20.7134 9.9221 20.4679 9.95011V13.1949C20.6862 13.2075 21.4496 13.2356 21.6814 13.2356C23.154 13.2356 23.727 12.6894 23.727 11.5984V11.4766ZM21.6814 14.7901C21.3272 14.7901 20.782 14.748 20.4679 14.7354V18.294C20.4679 18.4438 20.3591 18.5657 20.209 18.5657H18.8459C18.6956 18.5657 18.5732 18.4438 18.5732 18.294V8.91378C18.5732 8.64069 18.7364 8.54546 19.0091 8.50484C19.7181 8.39561 20.6862 8.32698 21.6814 8.32698C23.7814 8.32698 25.6081 9.06363 25.6081 11.4766V11.5984C25.6081 14.0128 23.7814 14.7901 21.6814 14.7901Z\" fill=\"#00598E\"/>");
  out += F("<path d=\"M32.1179 11.4766C32.1179 10.331 31.4368 9.89549 30.073 9.89549C29.7868 9.89549 29.105 9.9221 28.8595 9.95011V13.1949C29.0777 13.2075 29.8412 13.2356 30.073 13.2356C31.5456 13.2356 32.1179 12.6894 32.1179 11.5984V11.4766ZM30.073 14.7901C29.7188 14.7901 29.1736 14.748 28.8595 14.7354V18.294C28.8595 18.4438 28.7507 18.5657 28.6006 18.5657H27.2375C27.0872 18.5657 26.9648 18.4438 26.9648 18.294V8.91378C26.9648 8.64069 27.128 8.54546 27.4007 8.50484C28.1097 8.39561 29.0777 8.32698 30.073 8.32698C32.173 8.32698 33.9997 9.06363 33.9997 11.4766V11.5984C33.9997 14.0128 32.173 14.7901 30.073 14.7901Z\" fill=\"#00598E\"/>");
  out += F("</svg>\n");
  Serial.println(out);
 
  server.send(200, F("image/svg+xml"), out);
  
}

server.on(F("/logo.svg"), drawLogo);

as mentioned in the above error logs. When switching the last path tag my svg goes from displaying "SIP" to "SI P" . When removing the last path tag i no longer get the error as seen in the image.

a proper render will display" SIPP"

Has anyone seen this issue with wifi nina before? As seen above, i sent an issue request to the owner of the library and he suggested coming to the NiNa forums.

What made you think that your question has anything to do with the Website and Forum section which is clearly stated to be for "Improvements for the web system, applications to moderator, spam, etc."? I have suggested to the Moderator to move it to the Networking section.

This sort of carelessness makes unnecessary work for the Moderators.

...R

Could you please add a full sketch that shows the issue? It would make it a lot easier to test your code.