[mapserver-dev] Layer names in OGR connection strings (undocumented feature causing problems)

Tamas Szekeres szekerest at gmail.com
Sun Mar 3 13:09:50 PST 2013


According to a commit (made 11 years ago) in
the OGR connections strings are being split by the comma separators, see
the following fragment in msOGRFileOpen:

     papszTokens = CSLTokenizeStringComplex( conn_decrypted, ",", TRUE,

    if( CSLCount(papszTokens) > 0 )
      pszDSName = CPLStrdup( papszTokens[0] );
    if( CSLCount(papszTokens) > 1 )
      pszLayerDef = CPLStrdup( papszTokens[1] );

This behaviour causes issues if the syntax of the connection string may
normally expect commas, like with the issue:

Does it make sense to split the connection strings this way?

According to the OGR driver
documentation<http://mapserver.org/en/input/vector/ogr.html>the layer
definitions should go to the DATA section and not to the

I'd be in favour of removing this fragment from the code but I'm not sure
about all consequences.

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130303/cfbda3a7/attachment.html>

More information about the mapserver-dev mailing list