metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
209 stars 153 forks source link

LIBXML_NOEMPTYTAG causing issues for some registries #366

Closed DennisSkov closed 7 months ago

DennisSkov commented 9 months ago

Hello.

Some registries does not allow empty tags. When the write function is run, it's done with the option LIBXML_NOEMPTYTAG.

This means that

<update>
      <domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
        <domain:name>example.com</domain:name>
        <domain:add/>
        <domain:rem/>
        <domain:chg/>
      </domain:update>
    </update>

becomes

<update>
      <domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
        <domain:name>primaservers.dk</domain:name>
        <domain:add></domain:add>
        <domain:rem></domain:rem>
        <domain:chg></domain:chg>
      </domain:update>
    </update>

which is not allowed for some requests.

Could we have the option to overwrite setting the LIBXML_NOEMPTYTAG option?

metaregistrar commented 7 months ago

You can create your own branch with this change. I have not encountered registries so far that have a problem with this.