Coder Social home page Coder Social logo

Comments (13)

dalepsmith avatar dalepsmith commented on July 17, 2024 1

from mdns-sd.

dalepsmith avatar dalepsmith commented on July 17, 2024

This for case #77

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

@dalepsmith could you please help check if #82 works for you?

from mdns-sd.

dalepsmith avatar dalepsmith commented on July 17, 2024

from mdns-sd.

dalepsmith avatar dalepsmith commented on July 17, 2024

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

Thank you very much for checking it! I will look into it.

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

Thanks again for the testing. I've made the following changes:

  1. Use a Vec store the TXT properties: to keep the original order from the user input. (If the user passes in HashMap, then the ordering might not always be the same due to the nature of HashMap, but passing a slice should be good).

  2. Based on this quote from RFC 6763:

If a client receives a TXT record containing the same key more than
   once, then the client MUST silently ignore all but the first
   occurrence of that attribute. 

Now the client side will only record the first key appearance.

  1. Base on this quote from the same RFC:
A given key SHOULD NOT appear more than once in a TXT record.

Now the server side will only publish the first key appearance as well. This is different from avahi-publish-service based on your log, but I think it matches better with the RFC.

Let me know what you think and if it's working for you now. Thanks!

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

My testing shows that with the PR, we are doing:

  1. Treat the key as case insensitive. If there are multiple properties with the same key, only the first one is recorded.
  2. The same goes for publishing. If multiple properties have the same key, only the first one is published.
  3. The order of properties is kept as the order provided by the caller.

I'm shooting for merging this PR in a couple of days. If any comments or issues, please let me know. Thanks!

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

I've merged in PR #82 . If any issues, please let me know.

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

A version (0.6.0) is published, closing this issue. If any problems, please open a new issue.

from mdns-sd.

dalepsmith avatar dalepsmith commented on July 17, 2024

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

I would have expected to just see the "one=1" key.

You're correct. This is a bug. Thanks for checking! I've opened a PR to fix this. Sorry I missed this path earlier somehow.

Btw, congrats to your new job! hope everything go well for you.

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

The remaining issue is fixed in release 0.7.1. Closing this issue (again ;-) now.

from mdns-sd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.